From: Andrew Ruthven Date: Thu, 27 Dec 2007 20:30:05 +0000 (+1300) Subject: Don't try and use main::log, it doesn't exist. Use carp instead. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04508725e2783350ee547b950ce211cfaa847f57;p=spong.git 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. --- 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);