protected static class ProcessGroovyMethods.ProcessRunner
extends Object
implements Runnable
A Runnable which waits for a process to complete together with a notification scheme allowing another thread to wait a maximum number of seconds for the process to complete before killing it.
| Constructor and description |
|---|
ProcessRunner(Process process)Binds this runner to process. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
run() |
|
public void |
waitForOrKill(long millis)Waits up to millis milliseconds for run() to finish. |
Binds this runner to process.
process - the process run() waits for and waitForOrKill(long) may destroy Waits up to millis milliseconds for run() to finish. If the
process is still running, Process.destroy is called and this method
waits for the process to exit. An interrupt during the timed wait restores the
interrupt status and then still destroys the process when it has not finished.
millis - maximum wait before the process is destroyed, in millisecondsCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.