[lkml]   [2007]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] sigwait eats blocked default-ignore signals


    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.

    Signed-off-by: Roland McGrath <>
    kernel/signal.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/signal.c b/kernel/signal.c
    index 0ac614a..9b22790 100644
    --- a/kernel/signal.c
    +++ b/kernel/signal.c
    @@ -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? */
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2007-11-13 00:47    [W:0.032 / U:10.888 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site