Child.id
Returns the OS-assigned process identifier associated with this child.
Child.kill
Forces the child process to exit. If the child has already exited, its a no-op.
This is equivalent to sending a SIGKILL on Unix platforms.
Child.stderr
The handle for reading from the child’s standard error (stderr), if it has been captured. Calling this function more than once will yield error.
Child.stdin
The handle for writing to the child’s standard input (stdin), if it has been captured. Calling this function more than once will yield error.
Child.stdout
The handle for reading from the child’s standard output (stdout), if it has been captured. Calling this function more than once will yield error.
Child.wait
Waits for the child to exit completely, returning the status that it exited with. This function will continue to have the same return value after it has been called at least once.
The stdin handle to the child process, if any, will be closed
before waiting. This helps avoid deadlock: it ensures that the
child does not block waiting for input from the parent, while
the parent waits for the child to exit.
Child.wait_with_output
WARNING: Calling
wait_with_output consumes the child instance, causing errors on subsequent calls to other methods.
Simultaneously waits for the child to exit and collect all remaining
output on the stdout/stderr handles, returning an Output
instance.
The stdin handle to the child process, if any, will be closed
before waiting. This helps avoid deadlock: it ensures that the
child does not block waiting for input from the parent, while
the parent waits for the child to exit.
By default, stdin, stdout and stderr are inherited from the parent.
In order to capture the output into this Result<Output> it is
necessary to create new pipes between parent and child. Use
stdout('piped') or stderr('piped'), respectively.
