On Fri, May 03, 2002 at 05:51:42PM +0200, walter valenti wrote:
> for($i=1;$i<=5;$i++){
>    my $pid=fork;
>    die "$!\n" unless defined($pid);
>    unless($pid){
>    sleep;
>    }
> }
> sleep;
[snip]
> if i send a 'TERM' at the father, i want that the fathet kill the childs 
> and aftet it dies... but how do the father to obtain the "pid" of the 
> childs ???'????

You have the PID right there, returned by fork().  Store it in an array or
something and use that to send signals to the children.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to