]> Dogcows Code - chaz/tint2/commitdiff
*fix* unset sigmask only for child fork
authorAndreas Fink <andreas.fink85@googlemail.com>
Mon, 7 Dec 2009 14:10:14 +0000 (14:10 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Mon, 7 Dec 2009 14:10:14 +0000 (14:10 +0000)
src/clock/clock.c

index b5c3e41920bc271a36e7a857718c84dd289c0c31..578a2b2e2d25842a581cf40a530fd9873e45ffb8 100644 (file)
@@ -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);
                }
This page took 0.030133 seconds and 4 git commands to generate.