http://www.perlmonks.org?node_id=927120


in reply to Best way to kill a child process

You are probably running into the common problem where you are actually getting the $pid of the shell, from fork(), which is actually running your desired forked program. You need to kill the shell and all it's descendants. Try:
use Proc::Killfam; killfam 9, $pid;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh