Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run

by Anonymous Monk
on Apr 07, 2017 at 13:28 UTC ( [id://1187396]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # $SIG{'INT'} = sub { kill 'TERM', -$$ };  # this works already
    $SIG{'TERM'} = sub { MCE->exit(0) };       # Notifies the parent
    
  2. or download this
    $SIG{'TERM'} = sub {
        if (MCE->wid > 0) {
    ...
        }
    };
    

Log In?
Username:
Password:

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

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

    No recent polls found