Kernel events without kevents
Posted Mar 17, 2007 0:41 UTC (Sat) by
giraffedata (subscriber, #1954)
In reply to:
Kernel events without kevents by vmole
Parent article:
Kernel events without kevents
If I call sigprocmask() first, am I guaranteed that the masked signals will queued to the signal fd when I get around to creating it?
I haven't seen the implementation, but that would be the most natural way. I don't think signals are queued to a fd at all; I think read of the fd checks for and receives pending signals, in spite of any mask (so poll checks for pending signals). And assuming it's documented with those words, there's not much room for confusion.
This mess is why sigaction(2) was invented, to allow you to set both signal of interest and signals to mask in one operation.
How does it do that? I don't think sigaction modifies the signal mask.
And you don't need it to. Where would it be useful?
However, I agree that there is no practical application of signals arbitrarily being delivered traditionally or to an fd, so except that it's extra code, it would be sensible to have signalfd() automatically block the signal class.
(
Log in to post comments)