mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
57d9eec641
signalfd may behave differently to sigaction/signal, so to avoid breaking libevent users (like [1], [2]) disable it by default. [1]: https://github.com/tmux/tmux/pull/3621 [2]: https://github.com/tmux/tmux/pull/3626 Also signalfd is not that perfect: - you need to SIG_BLOCK the signal before - blocked signals are not reset on exec - blocked signals are allowed to coalesce - so in case of multiple signals sent you may get the signal only once (ok for most of the signals, but may be a problem for SIGCHLD, though you may call waitpid() in a loop or use pidfd) - and also one implementation problem - sigprocmask is unspecified in a multithreaded process Refs: - https://lwn.net/Articles/415684/ - https://ldpreload.com/blog/signalfd-is-useless Refs: https://github.com/libevent/libevent/issues/1460 Refs: #1342 (cc @dmantipov)