未验证 提交 4c592656 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #4225 from stephanreiter/master

[JENKINS-59152] - Reduce the default process soft-kill timeout from 2 minutes to 5 seconds
...@@ -156,7 +156,13 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree, ...@@ -156,7 +156,13 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
*/ */
public abstract void killAll(Map<String, String> modelEnvVars) throws InterruptedException; 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()}. * Convenience method that does {@link #killAll(Map)} and {@link OSProcess#killRecursively()}.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册