Re: [patch 1/4] signalfd v1 - signalfd core ...

From: Davide Libenzi
Date: Wed Mar 07 2007 - 17:02:32 EST


On Wed, 7 Mar 2007, Linus Torvalds wrote:

>
>
> On Wed, 7 Mar 2007, Davide Libenzi wrote:
> >
> > You have the *choice* to do that:
> >
> > 1) You want standard delivery only:
> >
> > - Just dont use signalfd
> >
> > 2) you want signalfd only:
> >
> > - Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd
> >
> > If you want both, you can have it. Race free.
>
> .. but maybe with more code and lots of confusion. I'm still unclear on
> any upsides here.

Ok, given that you have to place the notifiers (you had a direct call to
wake_up, same thing - but was not handling the "the sighand has been
detched" case), your queue_signal() call translates to:

sq = list_entry(ctx->squeue.next, struct signalfd_sq, lnk);
list_del(&sq->lnk);

That's pretty much it. There is more code WRT your patch, but there are
more things handled too (reuse of the fd, notify detachment, send siginfo).
And those has to be handled in any case.



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/