From 5cb3e2a06b44c3fe1984305a12b1c0ec140d007e Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 2 Dec 2009 22:42:36 +0000 Subject: [PATCH] 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 --- bin/opensrf-perl.pl.in | 1 + 1 file changed, 1 insertion(+) 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"); } } -- 2.11.0