Commit
variable
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,19 +147,12 @@ protected boolean isPidRunning(int pid) { | |
if (procFile.canRead()) { | ||
try { | ||
List<String> args = readProcFile(procFile); | ||
String appName = config.getApplicationParameters().get(0); | ||
boolean isJava = false; | ||
boolean isMe = false; | ||
|
||
for (String arg : args) { | ||
if (arg.contains(config.getJavaCommand())) { | ||
isJava = true; | ||
} | ||
if (arg.contains(appName) || arg.contains(Constants.JAR_NAME)) { | ||
isMe = true; | ||
return true; | ||
} | ||
} | ||
return isJava && isMe; | ||
return false; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
erilong
Author
Contributor
|
||
} catch (IOException e) { | ||
} | ||
} | ||
|
@erilong Do you happen to remember why you removed this extra check on the appName? We have some machines that sometimes are not properly shutdown and when that happens they occasionally fail to actually run the sym service after reboot. We believe what is happening is that the server PID from before the shutdown occasionally gets re-used, and causes this code to incorrectly attempt to kill that other PID so maybe the kill command is throwing an exception or something. It seems like these extra checks in isPidRunning that were removed might solve that problem.