Skip to content

Commit

Permalink
[FIXED JENKINS-28400] If the PID does not appear after 15s, assume th…
Browse files Browse the repository at this point in the history
…e launch failed.
  • Loading branch information
jglick committed Feb 19, 2016
1 parent 7f14ad2 commit 27ed991
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 27ed991

Please sign in to comment.