From: erickson Date: Wed, 2 Dec 2009 22:43:51 +0000 (+0000) Subject: Prevent infinite loop (with logging) in child process reaping. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8422e4ef4528ea857ab481aeeb22360b0e4ec6e0;p=OpenSRF.git Prevent infinite loop (with logging) in child process reaping. From the perl docs on waitpid: Note that on some systems, a return value of "-1" could mean that child processes are being automatically reaped. See perlipc for details, and for other examples. git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_1_2@1866 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/bin/opensrf-perl.pl.in b/bin/opensrf-perl.pl.in index 3ca98b1..bd7874e 100755 --- a/bin/opensrf-perl.pl.in +++ b/bin/opensrf-perl.pl.in @@ -121,6 +121,7 @@ sub do_start { launch_listener($service); $0 = "OpenSRF controller [$service]"; while(my $pid = waitpid(-1, 0)) { + last if $pid == -1; $logger->debug("Cleaning up Perl $service process $pid"); } }