Skip to content

Commit

Permalink
0003510: Service wrapper hanging on start on Windows 2003 server
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Apr 5, 2018
1 parent 4857a2d commit 0ac0016
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -192,10 +192,15 @@ protected boolean isPidRunning(int pid) {
Process proc = pb.start();
pb.redirectErrorStream(true);
BufferedReader stdout = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = stdout.readLine();
do {
line = stdout.readLine();
} while (line != null && line.trim().equals(""));
String line = null, curLine = null;
boolean isHeaderLine = true;
while ((curLine = stdout.readLine()) != null) {
if (isHeaderLine) {
isHeaderLine = false;
} else if (line == null && !curLine.trim().equals("")) {
line = curLine;
}
}
stdout.close();

if (line != null) {
Expand Down

0 comments on commit 0ac0016

Please sign in to comment.