From 3c67a10347206e324668378f2808f3e506506b0d Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 2 Oct 2016 23:08:39 +0200 Subject: [PATCH] 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 --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index cd594977..de9b2cad 100644 --- a/exec.c +++ b/exec.c @@ -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");