summary refs log tree commit diff
path: root/sysdeps/posix/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/sleep.c')
-rw-r--r--sysdeps/posix/sleep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/posix/sleep.c b/sysdeps/posix/sleep.c
index 36864cbf6e..20f78a08bb 100644
--- a/sysdeps/posix/sleep.c
+++ b/sysdeps/posix/sleep.c
@@ -58,8 +58,8 @@ DEFUN(sleep, (seconds), unsigned int seconds)
 
   act.sa_handler = sleep_handler;
   act.sa_flags = 0;
-  if (sigemptyset (&act.sa_mask) < 0 ||
-      sigaction (SIGALRM, &act, &oact) < 0)
+  act.sa_mask = oset;	/* execute handler with original mask */
+  if (sigaction (SIGALRM, &act, &oact) < 0)
     return seconds;
 
   before = time ((time_t *) NULL);