]> Dogcows Code - chaz/tint2/blobdiff - src/clock/clock.c
*fix* unset sigmask only for child fork
[chaz/tint2] / 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.021603 seconds and 4 git commands to generate.