fix bug in END with undefined $pp

This commit is contained in:
Oliver Gorwits
2012-12-17 14:28:05 +00:00
parent 626f8d6b6d
commit 563f2ded89

View File

@@ -124,8 +124,10 @@ sub handle_term {
# in case we screw up and die ourselves
END {
$pp->signal_all_children('TERM');
$pp->wait_all_children;
if (defined $pp) {
$pp->signal_all_children('TERM');
$pp->wait_all_children;
}
}
# nullify this to permit Parallel::Prefork to register handlers instead