Add a note that when custom signal handler is installed for a signal,
signal action is restored to default in child after fork(2). In this case there is no need to do anything with dummy SIGCHLD handler, because after fork(2) it will be automatically reverted to SIG_IGN. Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 3 days
This commit is contained in:
parent
9cc97e5803
commit
bcaa0b6789
@ -372,6 +372,11 @@ hook_execv(const char *path, va_list ap)
|
||||
descriptors();
|
||||
PJDLOG_VERIFY(sigemptyset(&mask) == 0);
|
||||
PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
|
||||
/*
|
||||
* Dummy handler set for SIGCHLD in the parent should be
|
||||
* changed after fork(2) automatically to the default SIG_IGN,
|
||||
* so there is no need to do anything with it.
|
||||
*/
|
||||
execv(path, args);
|
||||
pjdlog_errno(LOG_ERR, "Unable to execute %s", path);
|
||||
exit(EX_SOFTWARE);
|
||||
|
Loading…
Reference in New Issue
Block a user