# $SIG{'INT'} = sub { kill 'TERM', -$$ }; # this works already $SIG{'TERM'} = sub { MCE->exit(0) }; # Notifies the parent #### $SIG{'TERM'} = sub { if (MCE->wid > 0) { # worker MCE->exit(0); } else { # parent MCE::Signal::stop_and_exit('TERM'); } };