about summary refs log tree commit diff
path: root/signal
diff options
context:
space:
mode:
Diffstat (limited to 'signal')
-rw-r--r--signal/sigrelse.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/signal/sigrelse.c b/signal/sigrelse.c
index e41c2bd261..61f240be5e 100644
--- a/signal/sigrelse.c
+++ b/signal/sigrelse.c
@@ -26,14 +26,8 @@ sigrelse (int sig)
 {
   sigset_t set;
 
-  /* Retrieve current signal set.  */
-  if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0)
+  sigemptyset (&set);
+  if (sigaddset (&set, sig) < 0)
     return -1;
-
-  /* Remove the specified signal.  */
-  if (sigdelset (&set, sig) < 0)
-    return -1;
-
-  /* Set the new mask.  */
-  return __sigprocmask (SIG_SETMASK, &set, NULL);
+  return __sigprocmask (SIG_UNBLOCK, &set, NULL);
 }