Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Re: Re: Killing child process

by Thelonius (Priest)
on Oct 13, 2003 at 02:20 UTC ( #298746=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Killing child process
in thread Killing child process

Oops, yeah, I forgot you need to set the process group for the process you want to be a group leader. To do this call setpgrp(0,0); after the fork. In your test program, do it right where you have print "CREATED CHILD $$\n"; and don't do it in the grandchildren.

Replies are listed 'Best First'.
Re: Re: Re: Re: Killing child process
by sgifford (Prior) on Oct 13, 2003 at 03:31 UTC

    Cool, that worked! Thanks, I've always wondered how process groups worked.

    Now, I wonder if this answered the OP's question?... :-)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2023-05-30 18:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found