From 04508725e2783350ee547b950ce211cfaa847f57 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Fri, 28 Dec 2007 09:30:05 +1300 Subject: [PATCH] Don't try and use main::log, it doesn't exist. Use carp instead. It seems that if the child process has any problems whatsoever it continues to run, returning from SafeExec and usurping control. So everytime the child has a problem, it usurps control, leaving the parent waiting. After a while you get quite a few processes hanging around doing waitpids. --- src/lib/Spong/SafeExec.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Spong/SafeExec.pm b/src/lib/Spong/SafeExec.pm index abee8b1..c561b68 100644 --- a/src/lib/Spong/SafeExec.pm +++ b/src/lib/Spong/SafeExec.pm @@ -66,7 +66,7 @@ sub safe_exec { carp "'$cmd' failed with signal " . ($? & 127); exit -1; } elsif ($? != 0) { - main::log("Command '$cmd' return error code: " . $? >> 8); + carp "Command '$cmd' return error code: " . $? >> 8; } main::debug("Child process finished '$cmd'", 10); -- 2.30.2