提交 f434c22f 编写于 作者: D Daniel Beck

Merge pull request #1238 from gmjck/master

[FIX JENKINS-22685] Jenkins cannot restart Windows service
......@@ -132,7 +132,8 @@ public class WindowsServiceLifecycle extends Lifecycle {
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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册