Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion core/src/main/java/hudson/util/ProcessTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ public final Iterator<OSProcess> iterator() {
*/
public abstract void killAll(Map<String, String> modelEnvVars) throws InterruptedException;

private final long softKillWaitSeconds = Integer.getInteger("SoftKillWaitSeconds", 2 * 60); // by default processes get at most 2 minutes to respond to SIGTERM (JENKINS-17116)
/**
* The time to wait between sending Ctrl+C and killing the process. (JENKINS-17116)
*
* The default is 5 seconds. Careful! There are other timers in the system that may
* interfere with this value here, e.g. in org.jenkinsci.plugins.workflow.cps.CpsThread.stop
*/
private final long softKillWaitSeconds = Integer.getInteger("SoftKillWaitSeconds", 5);

/**
* Convenience method that does {@link #killAll(Map)} and {@link OSProcess#killRecursively()}.
Expand Down