Expand description
Configure, run, and monitor single child processes or entire pipelines of processes.
ChildBuilder is the heart of this crate, it is responsible for
starting child processes. The
ioconfig module contains data structures that are used by
ChildBuilder to create pipes and do various operations with file
descriptors. The envconfig module has a builder for process
environments - use it to set environment variables and control what a
child process inherits from the parent process environment. The types
in the pipeline module are conveniences for constructing and
monitoring common case pipelines.
Re-exports§
pub use pipeline::PipelineChildren;pub use pipeline::SimplePipelineBuilder;
Modules§
- envconfig
- Types for manipulating the environment variables of a child process
- ioconfig
- Types used to configure child process file descriptors. The values
obtained via the functions in this module are used with
ChildBuilder::config_io(). - pipeline
- Helpers for composing child processes into a pipeline. Constructing
pipelines manually is tedious and error prone.
SimplePipelineBuilderwill handle piping stdout -> stdin between processes and spawn everything in a simpler way than manually configuring pipes. Seeioconfig::interprocess_pipe().
Structs§
- Argument
- Helper type for dealing with different ways to represent child process arguments.
- Child
- Struct that represents a running or ended child process. Process
exit status is collected via
.wait(). - Child
Builder - Struct for configuration of a child process. File descriptors are
configured by calling
Self::config_io()with values obtained from theioconfigmodule. Environment is configured viaSelf::set_env()with a value obtained fromenvconfig::EnvironmentBuilder. - Child
Handle - Holds a reference to a running child process that may be used to
send signals to it. Obtained by calling
Child::get_handle(). Useful for sending signals to a child that is being waited on by another thread.
Enums§
- Errno
- Signal
Error - Wait
Status - Possible return values from
wait()orwaitpid().