public class NativeChildProcess extends AbstractChildProcess
Modifier and Type | Class and Description |
---|---|
private static class |
NativeChildProcess.Cleaner
Provides a simple mechanism to wait for the exit of a process on an
asynchronous basis (on a new thread dedicated to this wait).
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
background
Background mode flag.
|
artificial, batch, terminal
Constructor and Description |
---|
NativeChildProcess(ScreenDriver driver)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
asynchCleanup(int pid)
Asynchronously cleanup any operating system resources when the interactive child process
has exited.
|
int |
launch(java.lang.String[] cmdline,
boolean silent)
Launch the specified command line as an interactive child process.
|
void |
waitForExit(int pid,
boolean silent)
Block execution until the interactive child process has exited.
|
inBatchMode, isArtificialTerm, pauseForUser, resume, suspend
public NativeChildProcess(ScreenDriver driver)
driver
- The client driver instance in use.public int launch(java.lang.String[] cmdline, boolean silent)
cmdline
- The command line to execute. The first element must be the program name.silent
- false
for interactive mode (there the terminal is expected to be
shared by the child process and the user is allowed to directly interact with
the child process.public void waitForExit(int pid, boolean silent) throws java.lang.InterruptedException
pid
- The operating system process ID of the child process on which to wait.silent
- false
for interactive mode (there the terminal is expected to be
shared by the child process and the user is allowed to directly interact with
the child process.java.lang.InterruptedException
public void asynchCleanup(int pid)
pid
- The operating system process ID of the child process on which to wait.