forked from I2P_Developers/i2p.i2p
add null check to isProcessRunning() in new ShellService
This commit is contained in:
@@ -91,7 +91,7 @@ public class ShellService implements ClientApp {
|
||||
_pb.redirectOutput(_outputLog);
|
||||
_pb.redirectError(_errorLog);
|
||||
_pb.directory(pluginDir);
|
||||
changeState(ClientAppState.INITIALIZED, "ShellService: " + getName() + " set up and initialized");
|
||||
changeState(ClientAppState.INITIALIZED, "ShellService: " + getName() + " setup and initialized");
|
||||
}
|
||||
|
||||
private String[] trimArgs(String[] args) {
|
||||
@@ -189,6 +189,8 @@ public class ShellService implements ClientApp {
|
||||
* not running
|
||||
*/
|
||||
public boolean isProcessRunning() {
|
||||
if (_p == null)
|
||||
return false;
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Checking process status " + getName() + _p.isAlive());
|
||||
return _p.isAlive();
|
||||
|
||||
Reference in New Issue
Block a user