* sysdeps/posix/sleep.c (sleep): initialize sa_mask to mask of
currently blocked signals instead of the empty mask to ensure
that execution of alarm handler occurs with none of the currently
blocked signals enabled.
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);