private class ProcessStream.Waiter
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
alive
Status of the child process.
|
private int |
pid
The child process for which to wait.
|
| Constructor and Description |
|---|
Waiter(int pid)
Constructs an instance that has the data needed to wait for the
child process and report on that process' state.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
alreadyInWait(int pid)
Verify if the given process already waited to be done.
|
boolean |
isAlive()
Accesses the status of the child process.
|
void |
run()
Waits for the child process to die and then sets the
alive status to false. |
private int pid
private boolean alive
public Waiter(int pid)
pid - The child process for which to wait.public boolean isAlive()
true, the process is still running.public boolean alreadyInWait(int pid)
true, the process is under waiting for complete.public void run()
alive status to false.run in interface java.lang.Runnable