Skip to content

Commit

Permalink
sigwait eats blocked default-ignore signals
Browse files Browse the repository at this point in the history
While a signal is blocked, it must be posted even if its action is
SIG_IGN or is SIG_DFL with the default action to ignore.  This works
right most of the time, but is broken when a sigwait (rt_sigtimedwait)
is in progress.  This changes the early-discard check to respect
real_blocked.  ~blocked is the set to check for "should wake up now",
but ~(blocked|real_blocked) is the set for "blocked" semantics as
defined by POSIX.

This fixes bugzilla entry 9347, see

	http://bugzilla.kernel.org/show_bug.cgi?id=9347

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Nov 13, 2007
1 parent 6fa0283 commit 325d22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int sig_ignored(struct task_struct *t, int sig)
* signal handler may change by the time it is
* unblocked.
*/
if (sigismember(&t->blocked, sig))
if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
return 0;

/* Is it explicitly or implicitly ignored? */
Expand Down

0 comments on commit 325d22d

Please sign in to comment.