Fix the very first ShellService bug, the long pid should be parsed from the pidString from the wrapper output, or it won't be available

This commit is contained in:
idk
2021-12-03 22:44:46 -05:00
parent e9aa3a55cc
commit a1ea48e2b6

View File

@@ -253,7 +253,7 @@ public class ShellService implements ClientApp {
buf.write((byte) result);
}
String pidString = buf.toString("UTF-8").replaceAll("[\\r\\n\\t ]", "");
long pid = _pid;
long pid = Long.parseLong(pidString);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Found " + getName() + "process with PID: " + pid);
return pid;