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.
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);