Modifier and Type | Method and Description |
---|---|
long |
exitValue()
Get the exit code from the child process, or raise
IllegalThreadStateException if it has not yet
terminated. |
SelectableChannel |
getErr()
Get the selectable channel for the error stream (input for parent, error output for child).
|
InputStream |
getErrorStream()
Get the stream for the error stream (input for parent, error output for child).
|
SelectableChannel |
getIn()
Get the selectable channel for the parent's input, which is the child's output.
|
InputStream |
getInputStream()
Get the stream for the parent's input, which is the child's output.
|
SelectableChannel |
getOut()
Get the selectable channel for the parent's output, which is the child's input.
|
OutputStream |
getOutputStream()
Get the stream for the parent's output, which is the child's input.
|
long |
getPid()
Get the pid of the child process.
|
int |
kill()
Kill the child process with a KILL signal.
|
int |
kill(jnr.constants.platform.Signal sig)
Kill the child process with the specified signal.
|
int |
killProcessGroup()
Kill the child process and all its descendants with a KILL signal.
|
int |
killProcessGroup(jnr.constants.platform.Signal sig)
Kill the child process and all its descendants with the specified signal.
|
long |
waitFor()
Wait for the subprocess to terminate and return its exit code.
|
public long getPid()
public SelectableChannel getOut()
public OutputStream getOutputStream()
public SelectableChannel getIn()
public InputStream getInputStream()
public SelectableChannel getErr()
public InputStream getErrorStream()
public long waitFor()
public int kill()
public int kill(jnr.constants.platform.Signal sig)
sig
- the signal to send to the child processpublic int killProcessGroup()
public int killProcessGroup(jnr.constants.platform.Signal sig)
sig
- the signal to send to the child and its descendantspublic long exitValue()
IllegalThreadStateException
if it has not yet
terminated.Copyright © 2020. All rights reserved.