Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Forking two processes in parallel

by andal (Hermit)
on Mar 07, 2016 at 08:16 UTC ( [id://1156975]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub fork_bot{
        my $arg = shift;
    ...
        kill 1, $pid or die "Can't kill $arg->{bot}: $!\n";
        exit(0);
    }
    
  2. or download this
    my $chld;
    do{
       $chld = wait();
    }while($chld >= 0);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-24 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found