Restore default handlers in children

This commit is contained in:
Quentin Rameau 2017-07-24 00:53:56 +02:00 committed by Laslo Hunhold
parent 1c5f45c090
commit 24167b5c07

View file

@ -1057,6 +1057,9 @@ main(int argc, char *argv[])
fprintf(stderr, "%s: fork: %s\n", argv0, strerror(errno));
break;
case 0:
/* restore default handlers */
handlesignals(SIG_DFL);
/* reap children automatically */
if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
die("%s: signal: Failed to set SIG_IGN on SIGCHLD\n",