Unblock blocked signals after forking off a child

After forking off a new child, all signals that are blocked by finit
should be unblocked before exec-ing the final binary. Also, finit now
blocks SIGHUP, so add it to the set of signals that should be
unblocked.
This commit is contained in:
Tobias Waldekranz
2015-10-16 18:32:53 +02:00
parent c0af01db6d
commit a3193b34a6
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -278,6 +278,8 @@ int service_start(svc_t *svc)
_e("%starting %s: %s", respawn ? "Res" : "S", svc->cmd, buf);
}
sig_unblock();
if (svc->inetd.cmd)
status = svc->inetd.cmd(svc->inetd.type);
else
+1
View File
@@ -188,6 +188,7 @@ void sig_unblock(void)
struct sigaction sa;
sigemptyset(&nmask);
sigaddset(&nmask, SIGHUP);
sigaddset(&nmask, SIGCHLD);
sigaddset(&nmask, SIGINT);
sigaddset(&nmask, SIGPWR);