Re: USE_SIGCHLD
Yuval Kogman <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jun 07, 2008 at 19:08:31 -0400, Rocco Caputo wrote: > In other words, it eliminates that up-to-1-second wait for child > processes that always annoyed you. Without resorting to a faster, > less efficient polling interval. :) HAI! > Yuval: Reviewing the code, it looks like the SIGCHLD handler may be > triggered multiple times before the EN_SCPOLL event could be > dispatched. That would enqueue redundant EN_SCPOLL events, and it > could be marginally unoptimal. > Would it be feasible to disable the SIG$_[0] handler from the handler > and then re-enable it just before the children are reaped? Something > like this: I thought that would actually be less efficient, since setting and unsetting signal handlers has a pretty high overhead. I suppose some flag could be set, that would probably be faster than removing and readding the signal handler -- Yuval Kogman <[email protected]> http://nothingmuch.woobling.org 0xEBD27418