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

Jenkins preferably uses the java.lang.UNIXProcess.destroy(...) method in the JRE running Jenkins.
In OpenJDK 7 and up it seems to send SIGTERM, which is consistent with my observations below.
http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/27e0909d3fa0/src/solaris/native/java/lang/UNIXProcess_md.c#l722 (parameter is "false")
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/solaris/native/java/lang/UNIXProcess_md.c#l720 (parameter is "false")
http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/solaris/native/java/lang/UNIXProcess_md.c#l947
The call from Jenkins:
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/ProcessTree.java#L580
A build output of a very simple shell script demonstrating that SIGTERM is handled:
Building on master in workspace /var/lib/jenkins/workspace/jobname [jobname] $ /bin/sh -xe /tmp/hudson6478022098890718097.sh + trap 'echo TERM' TERM + sleep 50 Terminated ++ echo TERM TERM Build was aborted Aborted by Daniel Beck Finished: ABORTED