Skip to content
Permalink
Browse files
[FIXED JENKINS-28400] If the PID does not appear after 15s, assume th…
…e launch failed.
  • Loading branch information
jglick committed Feb 19, 2016
1 parent 7f14ad2 commit 27ed9917ef9a54b2dc6777aceae627384fcfeeb1
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/org/jenkinsci/plugins/durabletask/BourneShellScript.java
@@ -103,6 +103,7 @@ public String getScript() {
/*package*/ static final class ShellController extends FileMonitoringController {

private int pid;
private final long startTime = System.currentTimeMillis();

private ShellController(FilePath ws) throws IOException, InterruptedException {
super(ws);
@@ -145,6 +146,8 @@ private synchronized int pid(FilePath ws) throws IOException, InterruptedExcepti
status = -1;
}
return status;
} else if (_pid == 0 && /* compatibility */ startTime > 0 && System.currentTimeMillis() - startTime > /* 15s */15000) {
return -2; // apparently never started
}
return null;
}

0 comments on commit 27ed991

Please sign in to comment.