From 563f2ded899943085bfb290ec5970e5083bcfcc3 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 17 Dec 2012 14:28:05 +0000 Subject: [PATCH] fix bug in END with undefined $pp --- Netdisco/bin/netdisco-daemon | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Netdisco/bin/netdisco-daemon b/Netdisco/bin/netdisco-daemon index e8112538..e83ad06f 100755 --- a/Netdisco/bin/netdisco-daemon +++ b/Netdisco/bin/netdisco-daemon @@ -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