Subject: | Can't reap my own children |
At line 241 (of version 0.044):
local $SIG{CHLD} = 'IGNORE'; # reap child processes
According to the documenation[1], this means that I can't reap my own
children if I'm running inside HTTP::Server::Simple. So things like
system() and IPC::Run don't work properly. In fact, this very issue has
surfaced in Dancer:
https://github.com/sukria/Dancer/issues/499
It is possible to workaround by resetting $SIG{CHLD} in my code, but it
isn't clear to me why that should be necessary anyway. Can you help me
understand why HTTP::Server::Simple needs to have its children reaped
automatically? Thanks!
-Jeff
[1] (from perldoc perlipc): On most Unix platforms, the "CHLD"
(sometimes also known as "CLD") signal has special behavior with respect
to a value of 'IGNORE'. Setting $SIG{CHLD} to 'IGNORE' on such a
platform has the effect of not creating zombie processes when the parent
process fails to "wait()" on its child processes (i.e. child processes
are automatically reaped). Calling "wait()" with $SIG{CHLD} set to
'IGNORE' usually returns "−1" on such platforms.
--
Jeffrey Thalhammer
Imaginative Software Systems
www.imaginative-software.com