1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- File descriptors produced by dup() or dup2() now work exactly like

the original file descriptors they are duplicates of. I modified the
  function which maps file descriptor numbers to file descriptor
  table entries to return the table entries of the original files.

- In the thread-safe library, duplicated stdin/stdout/stderr
  descriptors now work like the "real" ones. This is true even if
  the "real" ones were closed and only their former aliases remain.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14909 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-04-01 18:46:37 +00:00
parent 09b52e077f
commit 6f010ddf87
19 changed files with 155 additions and 95 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_record_locking.c,v 1.8 2005-03-26 10:53:35 obarthel Exp $
* $Id: stdio_record_locking.c,v 1.9 2005-04-01 18:46:37 obarthel Exp $
*
* :ts=4
*
@ -772,6 +772,7 @@ __handle_record_locking(int cmd,struct flock * l,struct fd * fd,int * error_ptr)
assert( F_RDLCK <= l->l_type && l->l_type <= F_WRLCK );
assert( SEEK_SET <= l->l_whence && l->l_whence <= SEEK_END );
assert( error_ptr != NULL );
assert( FLAG_IS_CLEAR(fd->fd_Flags,FDF_STDIO) );
/* Remember to unlock any records before closing the file. */
fd->fd_Cleanup = cleanup_locked_records;