in reply to Handling badly behaved system calls in threads
That is the first time I've seen the strawman behavior, it's like grandchildren that won't die as part of a kill command. Only saving the pid of the command or it's associated shell, and killing it's pid will clean them up.
As you switch from backticks, to a form of IPC that gives the pid, have your slave threads either kill the pid themselves before joining(ending), or have them stuff the pid into a thread shared variable, so the master thread can do the cleanup.
In my experience, I always use Proc::Killfam on the pid obtained in the slave thread, since it will kill the shell and program pid.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Handling badly behaved system calls in threads
by kennethk (Abbot) on Aug 27, 2010 at 16:35 UTC |