@Override public void kill() { watchdog.destroyProcess(); }
@Override public void kill() { watchdog.destroyProcess(); }
public void stop() { // first, ask the watchdog nicely: watchdog.destroyProcess(); }
private void stopProcess(String paragraphId) { if (runningProcesses.containsKey(paragraphId)) { final Executor executor = runningProcesses.get(paragraphId); final ExecuteWatchdog watchdog = executor.getWatchdog(); watchdog.destroyProcess(); } }
@Override public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } }
public void destroy() { if ( watchdog != null && watchdog.isWatching() ) { System.err.println( "Shutdown in process - manual destruction of " + name ); watchdog.destroyProcess(); } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); } }
public void abort() { if (watchdog != null) { executor.setExitValues(new int[]{0, 143}); // we abort, so it's ok with 1 as exit value watchdog.destroyProcess(); } }
@Override public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } }
@Override public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } } }
/** * Stop a running Elasticsearch instance */ public void stop() { if (executor != null && !stopped) { stopped = true; executor.getWatchdog().destroyProcess(); } } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } } }
public void destroy() { if (processExecutor != null) { processExecutor.getWatchdog().destroyProcess(); processExecutor = null; } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); watchDog.stop(); } } }
public void shutdown() { if (watchDog != null) { watchDog.destroyProcess(); } }
private void forceKillProcess() { if (executor != null) { executor.getWatchdog().destroyProcess(); waitForExit(); } }
String line = "notepad.exe"; CommandLine cmdLine = CommandLine.parse(line); ExecuteWatchdog watchdog = new ExecuteWatchdog(timeout); Executor exec = new DefaultExecutor(); DefaultExecuteResultHandler handler = new DefaultExecuteResultHandler(); exec.execute(cmdLine, handler); // wait for script to run Thread.sleep(2000); // terminate it manually if needed if (someCondition) { watchdog.destroyProcess(); } // wait until the result of the process execution is propagated handler.waitFor(WAITFOR_TIMEOUT); System.out.println("Process exitValue: " + handler.getExitValue());