Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: killing threads inside forks

by mojo2405 (Acolyte)
on Jul 31, 2013 at 14:45 UTC ( [id://1047280]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    #Start fork
    ...
        print "done with pid $tmp";
        }
    
  2. or download this
    $SIG{INT}=\&ctrl_c_handler;
    
    ...
    my $tmp = waitpid($child, 0);
    }
    }
    
  3. or download this
    my $t = threads->new (sub{
             local $SIG{'USR1'}=sub {threads->exit();};
    ...
          });
    
    my $result = $t->join();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found