Use _exit instead of exit to terminate a vfork'ed process.

This avoids running the atexit handlers, which could have visible side
effects in the parent process.
This commit is contained in:
Wolfgang Lux 2023-10-09 22:51:01 +02:00
parent 5121156f6b
commit 3ed5eb3dcf
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2023-10-09 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSTask.m(launchAndReturnError:): Use _exit instead of
exit to terminate the vfork'ed process. This avoids running the
atexit handlers, which could have visible side effects in the
parent process.
2023-10-08 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPredicate.m: fixup for array access keywords

View file

@ -1735,11 +1735,11 @@ GSPrivateCheckTasks()
if (0 != chdir(path))
{
exit(-1);
_exit(-1);
}
(void)execve(executable, (char**)args, (char**)envl);
exit(-1);
_exit(-1);
}
else
{