From 8422e4ef4528ea857ab481aeeb22360b0e4ec6e0 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 2 Dec 2009 22:43:51 +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/branches/rel_1_2@1866 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 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"); } } -- 2.11.0