Kohsuke Kawaguchi edited a comment on Bug JENKINS-25503

This would be also a good place to do what we do with shell today; redirect stdout/err to a file, wait for the completion of the child process, then record exit code.

This lets us intercept various signals like SIGINT, SIGTERM, so that we can forward the signal to the child process and also record the fact in the exit code file.

Our current shell script wrapper doesn't do that, so in case the shell is killed (like the original Ctrl+C), we fail to capture what killed it, and instead we get non-descript -1 (from BourneShellScript):

int _pid = pid(workspace);
if (_pid > 0 && !ProcessLiveness.isAlive(workspace.getChannel(), _pid)) {
    return -1; // arbitrary code to distinguish from 0 (success) and 1+ (observed failure)
}
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to