From: erickson Date: Wed, 2 Dec 2009 22:42:36 +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=5cb3e2a06b44c3fe1984305a12b1c0ec140d007e;p=opensrf%2Fbjwebb.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/trunk@1865 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/bin/opensrf-perl.pl.in b/bin/opensrf-perl.pl.in index 80b7df6..d95d990 100755 --- a/bin/opensrf-perl.pl.in +++ b/bin/opensrf-perl.pl.in @@ -127,6 +127,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"); } }