diff --git a/library/changes b/library/changes index b3a1165..1f09ccc 100644 --- a/library/changes +++ b/library/changes @@ -1,4 +1,10 @@ -- Unlink is now reentrant, or at least thread-safe. +- __get_default_file() called __fd_unlock() without having called + __fd_lock() first. Ouch. + +- Removed an unnecessary pair of __fd_lock()..__fd_unlock() calls from + ttyname_r(). + +- The libunix.a unlink() function is now reentrant, or at least thread-safe. - You can now make unlink() stop after a failed deletion attempt which failed because the object to be deleted was reported as being "in use". diff --git a/library/fcntl_get_default_file.c b/library/fcntl_get_default_file.c index 2b81e8d..1f397c6 100644 --- a/library/fcntl_get_default_file.c +++ b/library/fcntl_get_default_file.c @@ -1,5 +1,5 @@ /* - * $Id: fcntl_get_default_file.c,v 1.6 2006-09-12 14:16:44 obarthel Exp $ + * $Id: fcntl_get_default_file.c,v 1.7 2006-09-27 11:54:54 obarthel Exp $ * * :ts=4 * @@ -60,7 +60,7 @@ __get_default_file(int file_descriptor,long * file_ptr) goto out; } - __fd_unlock(fd); + __fd_lock(fd); #if defined(__THREAD_SAFE) { diff --git a/library/unistd_ttyname_r.c b/library/unistd_ttyname_r.c index e50b191..1c1ef6b 100755 --- a/library/unistd_ttyname_r.c +++ b/library/unistd_ttyname_r.c @@ -1,5 +1,5 @@ /* - * $Id: unistd_ttyname_r.c,v 1.4 2006-09-25 14:05:31 obarthel Exp $ + * $Id: unistd_ttyname_r.c,v 1.5 2006-09-27 11:54:54 obarthel Exp $ * * :ts=4 * @@ -111,12 +111,8 @@ ttyname_r(int file_descriptor,char *name,size_t buflen) break; } - __fd_lock(fd); - if(file != ZERO && IsInteractive(file)) is_tty = TRUE; - - __fd_unlock(fd); } else {