Actually unblock signals for child processes

Also, make them session leader so they can manage their own offspring if
needed.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-10-02 23:08:39 +02:00
1 parent 6885a9f868
commit 3c67a10347
1 file changed
+2 -2
+2 -2
View File
@@ -105,8 +105,8 @@ int run(char *cmd)
struct sigaction sa;
/* Reset signal handlers that were set by the parent process */
for (i = 1; i < NSIG; i++)
DFLSIG(sa, i, 0);
sig_unblock();
setsid();
/* Always redirect stdio for run() */
fp = fopen("/dev/null", "w");