diff options
Diffstat (limited to 'signal')
-rw-r--r-- | signal/sighold.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/signal/sighold.c b/signal/sighold.c index 2e32e4718a..955ac5b0fb 100644 --- a/signal/sighold.c +++ b/signal/sighold.c @@ -26,14 +26,8 @@ sighold (int sig) { sigset_t set; - /* Retrieve current signal set. */ - if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0) - return -1; - - /* Add the specified signal. */ + sigemptyset (&set); if (sigaddset (&set, sig) < 0) return -1; - - /* Set the new mask. */ - return __sigprocmask (SIG_SETMASK, &set, NULL); + return __sigprocmask (SIG_BLOCK, &set, NULL); } |