From: Andreas Fink Date: Mon, 7 Dec 2009 14:10:14 +0000 (+0000) Subject: *fix* unset sigmask only for child fork X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=b4a0127130213dba32519e1b478257228aa4dc10;p=chaz%2Ftint2 *fix* unset sigmask only for child fork --- diff --git a/src/clock/clock.c b/src/clock/clock.c index b5c3e41..578a2b2 100644 --- a/src/clock/clock.c +++ b/src/clock/clock.c @@ -263,12 +263,12 @@ void clock_action(int button) } if (command) { pid_t pid; - sigset_t sigset; - sigprocmask(SIG_SETMASK, &sigset, 0); - sigprocmask(SIG_UNBLOCK, &sigset, 0); pid = fork(); - sigprocmask(SIG_BLOCK, &sigset, 0); if (pid == 0) { + // change for the fork the signal mask + sigset_t sigset; + sigprocmask(SIG_SETMASK, &sigset, 0); + sigprocmask(SIG_UNBLOCK, &sigset, 0); execl("/bin/sh", "/bin/sh", "-c", command, NULL); _exit(0); }