Messages in this thread | | | Subject | Re: Signal handling possibly wrong | From | Steven Rostedt <> | Date | Tue, 09 Aug 2005 16:19:05 -0400 |
| |
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
[unhandled content-type:application/x-executable] | |