|There's more than one way to do things|
Re^6: Best way to kill a child processby flexvault (Parson)
|on Oct 10, 2011 at 15:16 UTC||Need Help??|
. . . a coderef to a subroutine that causes a waitpid loop. . .
Just something to think about! I recently (past year) removed all uses of waitpid loops, since on some recent versions of AIX/Unix/Linux, especially on multi-core computers, if the child had been reaped by another core, the SIG handler hanged forever. I replace the code in the parent with:
It works, but like you I prefer the sub. I don't know if this behavior is a bug, or it its intentional. The problem doesn't seem to happen it the child exists, only when it has been reaped in a previous call.
I commented out the previous use, may need it again :-)
"Well done is better than well said." - Benjamin Franklin