/** * Is a process running: between started and terminated * @return true if the process is up. */ public synchronized boolean isProcessRunning() { return processStarted && !isProcessTerminated(); }
/** * Is a process running: between started and terminated * @return true if the process is up. */ public synchronized boolean isProcessRunning() { return processStarted && !isProcessTerminated(); }
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") @Override // ExitCodeProvider public int getExitCode() { Throwable cause = getFailureCause(); if (cause != null) { //failed for some reason if (cause instanceof ExitCodeProvider) { return ((ExitCodeProvider) cause).getExitCode(); } } ForkedProcessService lastProc = latestProcess(); if (lastProc == null || !lastProc.isProcessTerminated()) { return 0; } else { return lastProc.getExitCode(); } }
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") @Override // ExitCodeProvider public int getExitCode() { Throwable cause = getFailureCause(); if (cause != null) { //failed for some reason if (cause instanceof ExitCodeProvider) { return ((ExitCodeProvider) cause).getExitCode(); } } ForkedProcessService lastProc = latestProcess(); if (lastProc == null || !lastProc.isProcessTerminated()) { return 0; } else { return lastProc.getExitCode(); } }