iAdd comment on why we use fork()

This commit is contained in:
rfm 2024-06-21 12:34:34 +01:00
parent 4d12423c4e
commit 5a09b09fe3

View file

@ -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)
{