Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-22685] - Update WindowsLifeCycle.java to call restart!…
… to properly restart the service.

Using "restart!" instead of "restart" performs the restart in a separate process, so the service wrapper doesn't kill itself.
  • Loading branch information
gmjck committed May 23, 2014
1 parent ffaf8ed commit c667110
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -132,7 +132,8 @@ public void restart() throws IOException, InterruptedException {
else executable = new File(home, "hudson.exe");
if (!executable.exists()) executable = new File(home, "jenkins.exe");

int r = new LocalLauncher(task).launch().cmds(executable, "restart")
// use restart! to run hudson/jenkins.exe restart in a separate process, so it doesn't kill itself
int r = new LocalLauncher(task).launch().cmds(executable, "restart!")
.stdout(task).pwd(home).join();
if(r!=0)
throw new IOException(baos.toString());
Expand Down

0 comments on commit c667110

Please sign in to comment.