public void run() { if (p != null) { throw new IllegalStateException("Process already running"); } try { returnCode = null; p = runtime.exec(args, envp, workingDir); captureStdOutAndStdErr(); returnCode = new Integer(p.waitFor()); } catch (Exception e) { throw exceptions.toRuntime(e); } finally { // p.destroy(); p = null; for (int i = 0; i < listeners.size(); i++) { new Thread((Runnable) listeners.get(i)).start(); } listeners.clear(); } }
public void run() { if (p != null) { throw new IllegalStateException("Process already running"); } try { returnCode = null; p = runtime.exec(args, envp, workingDir); captureStdOutAndStdErr(); returnCode = new Integer(p.waitFor()); } catch (Exception e) { throw exceptions.toRuntime(e); } finally { // p.destroy(); p = null; for (int i = 0; i < listeners.size(); i++) { new Thread((Runnable) listeners.get(i)).start(); } listeners.clear(); } }
@Override public void run() { if (p != null) { throw new IllegalStateException("Process already running"); } try { returnCode = null; p = runtime.exec(args, envp, workingDir); captureStdOutAndStdErr(); returnCode = Integer.valueOf(p.waitFor()); } catch (Exception e) { throw exceptions.toRuntime(e); } finally { // p.destroy(); p = null; for (int i = 0; i < listeners.size(); i++) { new Thread((Runnable) listeners.get(i)).start(); } listeners.clear(); } }