in reply to Re: Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run
in thread Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run
$SIG{INT} points to MCE::Signal::stop_and_exit by MCE::Signal. Ditto for $SIG{TERM}. Folks can override that if need be like you've done. In that case, the following is needed.
$SIG{'TERM'} = sub { if (MCE->wid > 0) { # worker MCE->exit(0); } else { # parent MCE::Signal::stop_and_exit('TERM'); } };
|
|---|