Thank you for the reply ( marioroy? )!
In the first example, it was necessary to move the SIG handlers below the mce_loop statement, else it gave error:
MCE::exit: method is not allowed by the manager process at mce.pl line + 19.
After moving the SIG handlers, it gives no error but does not appear to execute any of the code in END:
The second example you provided gives the same result:PID 18566 Forked child with 18568 Forked child with 18569 Forked child with 18571 Forked child with 18572 Forked child with 18570 Forked child with 18573 ^C ## mce.pl: caught signal (INT), exiting Killed
PID 18874 Forked child with 18877 Forked child with 18876 Forked child with 18879 Forked child with 18878 Forked child with 18880 Forked child with 18881 ^C ## mce3.pl: caught signal (INT), exiting Killed
Note that the program runs successfully if left to complete:
PID 19017 Forked child with 19019 Forked child with 19020 Forked child with 19023 Forked child with 19022 Forked child with 19024 Forked child with 19021 Forked child with 19019 Forked child with 19020 Forked child with 19022 Forked child with 19023 19020 1491572765.74874 (Child) in END 19019 1491572765.75111 (Child) in END 19024 1491572765.75325 (Child) in END 19022 1491572765.7533 (Child) in END 19021 1491572765.7552 (Child) in END 19023 1491572765.75711 (Child) in END 19017 1491572765.75939 (Parent) in END Parent is ready to dump Dumping: $VAR1 = { '00 19019' => '1491572745.74377', '01 19019' => '1491572746.74401', '02 19019' => '1491572747.74421', '03 19019' => '1491572748.74441', '04 19019' => '1491572749.74457', '05 19019' => '1491572750.74473', '06 19019' => '1491572751.74493', '07 19019' => '1491572752.7451', '08 19019' => '1491572753.74529', '09 19019' => '1491572754.7455', '10 19020' => '1491572745.7436', '11 19020' => '1491572746.74385', '12 19020' => '1491572747.74405', '13 19020' => '1491572748.74427', ... }
Thank you again for the help.
In reply to Re^2: Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run
by 1nickt
in thread Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |