Skip to content
Permalink
Browse files

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

(cherry picked from commit f3566d1)

Conflicts:

	changelog.html
  • Loading branch information
kohsuke authored and vjuranek committed Dec 14, 2011
1 parent 0ab36d3 commit 3bf2e4f0f3e04d0cbccbe2656fece9ea96721ab1
Showing with 5 additions and 0 deletions.
  1. +2 −0 changelog.html
  2. +3 −0 core/src/main/java/hudson/lifecycle/UnixLifecycle.java
@@ -58,6 +58,8 @@
<li class=bug>
Fixed the OutOfMemoryError in trying to download/install JDK
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10689">issue 10689</a>)
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>)
</ul>
</div><!--=TRUNK-END=-->

@@ -52,6 +52,9 @@
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;

0 comments on commit 3bf2e4f

Please sign in to comment.
You can’t perform that action at this time.