]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 5 Dec 2002 10:45:13 +0000 (10:45 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 5 Dec 2002 10:45:13 +0000 (10:45 +0000)
2002-12-05  Ulrich Drepper  <drepper@redhat.com>

* dirent/bug-readdir1.c (main): Don't call closedir, just close on
the file descriptor.  This is testing what the bug report was about.

ChangeLog
dirent/bug-readdir1.c

index 4921fa5d37c572d95cd24e1d96be167ef445f4c6..e2566bfb1913e6a83b7a346b848b5361991a1aad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-05  Ulrich Drepper  <drepper@redhat.com>
+
+       * dirent/bug-readdir1.c (main): Don't call closedir, just close on
+       the file descriptor.  This is testing what the bug report was about.
+
 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
 
        * po/be.po: New file.
index f9c609cc984612bf954204af4e2096500455e944..1f70722dd2f6151ea398d2020488c80e730e8120 100644 (file)
@@ -23,11 +23,12 @@ main (void)
       exit (1);
     }
 
-  /* close the dir stream, making it invalid */
-  if (closedir (dirp))
+  /* close the directory file descriptor, making it invalid */
+  if (close (dirfd (dirp)) != 0)
     {
-      perror ("closedir");
-      exit (1);
+      puts ("could not close directory file descriptor");
+      /* This is not an error.  It is not guaranteed this is possible.  */
+      return 0;
     }
 
   ent = readdir (dirp);