]> git.etc.gen.nz Git - spong.git/commitdiff
Don't try and use main::log, it doesn't exist. Use carp instead.
authorAndrew Ruthven <andrew@etc.gen.nz>
Thu, 27 Dec 2007 20:30:05 +0000 (09:30 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Thu, 27 Dec 2007 20:30:05 +0000 (09:30 +1300)
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

index abee8b1f245842edc49c672e47a7e6ff8ee89ad5..c561b6855293b98c1cf94f3e45b45ebcdc9da21b 100644 (file)
@@ -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);