bonzini at gnu.org
Sun Oct 18 08:54:35 PDT 2009
On 09/28/2009 05:11 AM, Kevin Van Vechten wrote:
> I might have to implement EVFILT_PROC using a helper thread.
For NOTE_EXIT only you can use a SIGCHLD signalfd.
For anything else you'd need to use ptrace, which is probably not a
However, note that signalfd only works if you can guarantee that all
threads have blocked that signal. signalfd competes with
sigaction/sigwait rather than being lower priority; if a process signal
is given to another thread while you are reading on the signalfd for it,
you lose it.
"All" means that for example that you must block the signal before you
call pthread_create (and that's relatively fine) but also before you
call _any_ AIO function, because aio_init creates threads that you don't
know about and where the signal won't be blocked.
More information about the libdispatch-dev