Object readResolve() { return get(pid); } }
/** * Destroys the child process without join. */ private void destroy() throws InterruptedException { ProcessTree.get().killAll(proc,cookie); }
public Void call() throws RuntimeException { try { ProcessTree.get().killAll(modelEnvVars); } catch (InterruptedException e) { // we are asked to terminate early by the caller, so no need to do anything } return null; }
@Override public void kill(Map<String, String> modelEnvVars) throws InterruptedException { ProcessTree.get().killAll(modelEnvVars); }
/** * Kill the process when the channel is severed. */ @Override public synchronized void terminate(IOException e) { super.terminate(e); ProcessTree pt = ProcessTree.get(); try { pt.killAll(proc,cookie); } catch (InterruptedException x) { LOGGER.log(Level.INFO, "Interrupted", x); } }
/** * Convenience method that does {@link #killAll(Map)} and {@link OSProcess#killRecursively()}. * This is necessary to reliably kill the process and its descendants, as some OS * may not implement {@link #killAll(Map)}. * * Either of the parameter can be null. */ public void killAll(Process proc, Map<String, String> modelEnvVars) throws InterruptedException { LOGGER.fine("killAll: process="+proc+" and envs="+modelEnvVars); OSProcess p = get(proc); if(p!=null) p.killRecursively(); if(modelEnvVars!=null) killAll(modelEnvVars); }
Object readResolve() { return get(pid); } }
public Void call() throws RuntimeException { try { ProcessTree.get(nativeUtils).killAll(modelEnvVars); } catch (InterruptedException e) { // we are asked to terminate early by the caller, so no need to do anything } return null; }
/** * Destroys the child process without join. */ private void destroy() throws InterruptedException { ProcessTree.get().killAll(proc,cookie); }
public Void call() throws RuntimeException { try { ProcessTree.get().killAll(modelEnvVars); } catch (InterruptedException e) { // we are asked to terminate early by the caller, so no need to do anything } return null; }
@Override public void onClosed(Channel channel, IOException cause) { reportProcessTerminated(proc, listener); try { ProcessTree.get().killAll(proc, cookie); } catch (InterruptedException e) { LOGGER.log(Level.INFO, "interrupted", e); } } });
/** * Destroys the child process without join. */ private void destroy() throws InterruptedException { ProcessTree.get().killAll(proc,cookie); }
public Void call() throws RuntimeException { try { ProcessTree.get(nativeUtils).killAll(modelEnvVars); } catch (InterruptedException e) { // we are asked to terminate early by the caller, so no need to do anything } return null; } private static final long serialVersionUID = 1L;
public Void call() throws RuntimeException { try { ProcessTree.get().killAll(modelEnvVars); } catch (InterruptedException e) { // we are asked to terminate early by the caller, so no need to do anything } return null; }
/** * Destroys the child process without join. */ private void destroy() throws InterruptedException { ProcessTree.get().killAll(proc,cookie); }
/** * Gets the {@link ProcessTree} of the current system that JVM runs in, or * in the worst case return the default one that's not capable of killing * descendants at all. * * @return ProcessTree of the current system. */ public static ProcessTree get() { return get(NativeUtils.getInstance()); }
/** * Destroys the child process without join. */ private void destroy() throws InterruptedException { ProcessTree.get().killAll(proc, cookie); }
public Void call() throws RuntimeException { try { ProcessTree.get().killAll(modelEnvVars); } catch (InterruptedException e) { // we are asked to terminate early by the caller, so no need to do anything } return null; }