mirror of
https://github.com/troglobit/finit.git
synced 2026-11-20 19:41:51 +00:00
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:
1 parent
6885a9f868
commit
3c67a10347
1 file changed
+2
-2
@@ -105,8 +105,8 @@ int run(char *cmd)
|
|||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
|
|
||||||
/* Reset signal handlers that were set by the parent process */
|
/* Reset signal handlers that were set by the parent process */
|
||||||
for (i = 1; i < NSIG; i++)
|
sig_unblock();
|
||||||
DFLSIG(sa, i, 0);
|
setsid();
|
||||||
|
|
||||||
/* Always redirect stdio for run() */
|
/* Always redirect stdio for run() */
|
||||||
fp = fopen("/dev/null", "w");
|
fp = fopen("/dev/null", "w");
|
||||||
|
|||||||
Reference in new issue
Block a user