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

- Small fixes to fcntl() and select() to cover the thread-safe

fd->fd_DefaultFile == ZERO case.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14901 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-03-25 08:50:59 +00:00
parent 1fbe4bd0a5
commit 590d1b8eec
5 changed files with 34 additions and 22 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_system.c,v 1.6 2005-03-24 15:31:16 obarthel Exp $
* $Id: stdlib_system.c,v 1.7 2005-03-25 08:50:59 obarthel Exp $
*
* :ts=4
*
@ -177,17 +177,13 @@ system(const char * command)
PROFILE_OFF();
/* In thread-safe mode, system() operation can interfere with
regular file I/O if the same dos.library file handles are
involved. Because we really cannot predict which file handles
will be associated with the current Output() and Input()
streams, we play it safe and just block everything. */
__stdio_lock();
/* Push all currently buffered output towards the file handles,
in case the program to be launched writes to these files
or the console, too. */
__flush_all_files(-1);
result = SystemTagList((STRPTR)command, (struct TagItem *)system_tags);
__stdio_unlock();
PROFILE_ON();
}