in reply to Re^4: Best way to kill a child process
in thread Best way to kill a child process
Yes.
I was thinking about a signal problem that a guy had about 6 months ago related to Apple OS X. We were using C and not Perl.
Your one line of code will work at least 99% of the time!
My 2 lines of code may work at a higher probability, but I don't think that it matters at all!
The "right way" to deal with this is to have a CHLD signal handler. And either set that thing to "IGNORE' or a coderef to a subroutine that causes a waitpid loop. $SIG{CHLD}='IGNORE'; is far superior to doing nothing with the CHLD signal.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Best way to kill a child process
by flexvault (Monsignor) on Oct 10, 2011 at 15:16 UTC | |
by Marshall (Canon) on Oct 15, 2011 at 21:18 UTC | |
by flexvault (Monsignor) on Oct 16, 2011 at 13:28 UTC | |
by Marshall (Canon) on Oct 18, 2011 at 00:44 UTC |