POLL: disable signalfd usage by default?
schmorp at schmorp.de
Sat Nov 14 01:24:36 CET 2009
I'd wish to ask you what you think about disabling signalfd usage by
Here are the pros of signalfd:
- signal handling becomes very easy and efficient
- it is simple to use signals from multiple loops (when one requires signalfd)
- it would make it possible to implement realtime signals later
using this approach, without having to queue data in a signal handler (which
And here is the contra:
signalfd usage requires blocking the signal handlers. unlike setting
signal handlers to IGN, many programs don't expect this, and since the
signal mask is inherited at exec time, this can lead to subprograms
not handling signals as expected.
While I personally enjoy signalfd very much, the potential for problems is
imho large, as the problem is subtle and might go unnoticed, especially
when not developing on a current linux kernel.
So what do you think, should signalfd usage be requested explicitly and
otherwise not be used?
If we adopt this, then I would change libev to have these creation flags:
#define EVFLAG_NOSIGFD 0U // for compatibility
#define EVFLAG_SIGFD 0x00400000U // to request signalfd support
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
More information about the libev