Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Best way to kill a child process

by zentara (Archbishop)
on Sep 21, 2011 at 10:26 UTC ( #927120=note: print w/ replies, xml ) Need Help??

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

Comment on Re: Best way to kill a child process
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927120]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2015-10-10 01:52 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls