Messages in this thread | | | Date | Mon, 18 Apr 2011 19:32:24 +0200 | From | Oleg Nesterov <> | Subject | Re: [RFC PATCH v2 0/7] signal: sigprocmask fixes |
| |
On 04/18, Linus Torvalds wrote: > > On Mon, Apr 18, 2011 at 6:44 AM, Oleg Nesterov <oleg@redhat.com> wrote: > > > > Once again: if we need this, then we need a lot more (trivial) changes > > like 6/7 and 7/7. Basically every change of ->blocked should be converted > > to use set_current_blocked(). OTOH, perhaps this makes sense by itself. > > Hmm. The more I think about this, the less I like it. > > What if the pending thread signal was thread-specific to begin with?
These patches should not change the current behaviour in this case. We never try to re-target the thread-specific signals. Note that retarget_shared_pending() checks ->signal->shared_pending only.
> For example, if we have a SIGFPE and a SIGKILL that happen at the same > time, a dying task may have a SIGFPE pending when it dies, and that > SIGFPE should _not_ be just distributed out to the other threads in > the thread group.
Yes, and it won't be.
Btw, we do not need to distribute SIGKILL too, we can change retarget_shared_pending() to remove SIGKILL from shared_pending. But this only matters when the caller is exit_signals(), and in this case it should likely notice signal_group_exit() unless SIGKILL (in unlikely case) it comes in between.
Or I misunderstood?
Oleg.
| |