提交 f3566d10 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-11742] don't change PID when a daemon is restarting

上级 0082ef89
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
If running as a daemon, don't daemonize one more time during restart.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-11742">issue 11742</a>)
<li class=bug>
Fixed NPE in Subversion polling of Maven jobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-11592">issue 11592</a>)
......
......@@ -52,6 +52,9 @@ public class UnixLifecycle extends Lifecycle {
public UnixLifecycle() throws IOException {
try {
args = JavaVMArguments.current();
// if we are running as daemon, don't fork into background one more time during restart
args.remove("--daemon");
} catch (UnsupportedOperationException e) {
// can't restart
failedToObtainArgs = e;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册