4 ms·
> As a matter of fact, you are not. I'm sure you know about EINTR. The problem with using signals to manage child processes comes when child processes are star
by skissane 10y ago
> As a matter of fact, you are not. I'm sure you know about EINTR.
The problem with using signals to manage child processes comes when child processes are started by libraries. If the library installs a handler for SIGCHLD, it could conflict with other libraries or with the application which wants to do the same thing. The great thing about FreeBSD style process descriptors is that no signal handlers are needed–a library can start a child process and then wait for it to complete (and wait for other things such as network sockets simultaneously) without relying on signal handlers which don't work well when an application is composed of numerous independently developed libraries (as many modern applications are).
- jstimpfle 10y agoI agree. Signals have process scope, so they are a bad idea in general (they counter composability), no matter what's the delivery mechanism. Signal FDs don't help here vs EINTR.