On Tue, 2005-08-09 at 16:03 -0400, Steven Rostedt wrote: > Man pages and kernel are right. I just tested this out on 2.6.13-rc3 > with the attached program and it seems to follow what is stated in the > man pages. So the assumption of what the code did by looking at it > proves to be the mistake. :-) > > Conclusion: sa_mask defers the signals. SA_NODEFER defers the sent > signal. I'm the one that's wrong here ;-) OK the kernel _does_ have a bug. Looking at the code, I now see it, and my last program didn't show it. The code in question was (as Bodo showed earlier): if (ret && !(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); sigaddset(¤t->blocked,sig); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); } Where, sa_mask is _ignored_ if NODEFER is set. (I now have woken up!). The attached program shows that the sa_mask is indeed ignored when SA_NODEFER is set. Now the real question is... Is this a bug? -- Steve
Attachment:
signal2
Description: application/executable
- Follow-Ups:
- Re: Signal handling possibly wrong
- From: Chris Wright <[email protected]>
- Re: Signal handling possibly wrong
- References:
- Signal handling possibly wrong
- From: Bodo Stroesser <[email protected]>
- Re: Signal handling possibly wrong
- From: Robert Wilkens <[email protected]>
- Re: Signal handling possibly wrong
- From: Bodo Stroesser <[email protected]>
- Re: Signal handling possibly wrong
- From: Robert Wilkens <[email protected]>
- Re: Signal handling possibly wrong
- From: Bodo Stroesser <[email protected]>
- Re: Signal handling possibly wrong
- From: Robert Wilkens <[email protected]>
- Re: Signal handling possibly wrong
- From: Steven Rostedt <[email protected]>
- Re: Signal handling possibly wrong
- From: Bodo Stroesser <[email protected]>
- Re: Signal handling possibly wrong
- From: Steven Rostedt <[email protected]>
- Signal handling possibly wrong
- Prev by Date: Re: [RFC][patch 0/2] mm: remove PageReserved
- Next by Date: Re: understanding Linux capabilities brokenness
- Previous by thread: Re: Signal handling possibly wrong
- Next by thread: Re: Signal handling possibly wrong
- Index(es):