mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- __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(). git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15156 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -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
|
- 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".
|
failed because the object to be deleted was reported as being "in use".
|
||||||
|
|||||||
@@ -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
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -60,7 +60,7 @@ __get_default_file(int file_descriptor,long * file_ptr)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
__fd_unlock(fd);
|
__fd_lock(fd);
|
||||||
|
|
||||||
#if defined(__THREAD_SAFE)
|
#if defined(__THREAD_SAFE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -111,12 +111,8 @@ ttyname_r(int file_descriptor,char *name,size_t buflen)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
__fd_lock(fd);
|
|
||||||
|
|
||||||
if(file != ZERO && IsInteractive(file))
|
if(file != ZERO && IsInteractive(file))
|
||||||
is_tty = TRUE;
|
is_tty = TRUE;
|
||||||
|
|
||||||
__fd_unlock(fd);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user