mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
iAdd comment on why we use fork()
This commit is contained in:
parent
4d12423c4e
commit
5a09b09fe3
1 changed files with 7 additions and 0 deletions
|
@ -1669,6 +1669,13 @@ GSPrivateCheckTasks()
|
|||
}
|
||||
edesc = [hdl fileDescriptor];
|
||||
|
||||
/* NB. we use fork() rather than vfork() because the bahavior of vfork()
|
||||
* is undefined when we assign to variables or make system calls (as we
|
||||
* do below) other than a very limited set.
|
||||
* For performance it might be possible to use vfork on systems where
|
||||
* there is a guarantee that vfork() is safe, but when in doubt we must
|
||||
* assume the standard POSIX behavior.
|
||||
*/
|
||||
pid = fork();
|
||||
if (pid < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue