*fix* unset sigmask only for child fork
git-svn-id: http://tint2.googlecode.com/svn/trunk@283 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
6c40536d1a
commit
88fa3b7544
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue