OSDN Git Service

* fhandler.h (fhandler_process::closedir): Declare.
authorcorinna <corinna>
Mon, 10 Oct 2011 18:59:55 +0000 (18:59 +0000)
committercorinna <corinna>
Mon, 10 Oct 2011 18:59:55 +0000 (18:59 +0000)
* fhandler_process.cc (fhandler_process::closedir): New function to
avoid a SEGV in fhandler_proc::closedir.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_process.cc

index c47b9e4..0abec83 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-10  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler.h (fhandler_process::closedir): Declare.
+       * fhandler_process.cc (fhandler_process::closedir): New function to
+       avoid a SEGV in fhandler_proc::closedir.
+
 2011-10-10  Christopher Faylor  <me.cygwin2011@cgf.cx>
 
        * fhandler_tty.cc (fhandler_pty_slave::open): Clarify debugging output.
index be6e012..cc391ae 100644 (file)
@@ -1531,6 +1531,7 @@ class fhandler_process: public fhandler_proc
   fhandler_process ();
   virtual_ftype_t exists();
   DIR *opendir (int fd) __attribute__ ((regparm (2)));
+  int closedir (DIR *);
   int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
   int open (int flags, mode_t mode = 0);
   int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
index 91e2286..128b35a 100644 (file)
@@ -210,6 +210,12 @@ fhandler_process::opendir (int fd)
 }
 
 int
+fhandler_process::closedir (DIR *dir)
+{
+  return fhandler_virtual::closedir (dir);
+}
+
+int
 fhandler_process::readdir (DIR *dir, dirent *de)
 {
   int res = ENMFILE;