aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-10 09:59:25 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-10 09:59:25 +0000
commitf90b426a8a9ea19275af545b498bfbae0e5bc443 (patch)
tree6340da1acf854f3995e04f66788d2280ee1d91d0
parent741e0d64d248719e8ac56f2feb2db0b997394948 (diff)
downloadglibc-f90b426a8a9ea19275af545b498bfbae0e5bc443.tar
glibc-f90b426a8a9ea19275af545b498bfbae0e5bc443.tar.gz
glibc-f90b426a8a9ea19275af545b498bfbae0e5bc443.tar.bz2
glibc-f90b426a8a9ea19275af545b498bfbae0e5bc443.zip
(__closedir): Remove __libc_lock_lock call. It is not allowed to destroy pthread mutexes which are still in use even though it is safe for our implementations. If somebody still uses the descriptor it is a bug.
-rw-r--r--sysdeps/unix/closedir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/unix/closedir.c b/sysdeps/unix/closedir.c
index 3045d73fba..c2fcbe549a 100644
--- a/sysdeps/unix/closedir.c
+++ b/sysdeps/unix/closedir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993,1995,1996,1998,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,9 @@ __closedir (DIR *dirp)
return -1;
}
- __libc_lock_lock (dirp->lock);
+ /* We do not try to synchronize access here. If some other thread
+ still uses this handle it is a big mistake and that thread
+ deserves all the bad data it gets. */
fd = dirp->fd;