Crate unix_exec_piper

Source

Structs§

BasicCmd
A basic command is a parsed form of for example
BasicCmdBuilder
Builder for BasicCmd.
CmdChain
A command chain is the unit that gets executed. It’s basically a parsed form of:
CmdChainBuilder
Builder for CmdChain.
Pipe
Abstraction over UNIX pipe for the specific case here with stdin/stdout redirection between processes. The typical flow is that a Pipe is created, the program is forked and that one process marks it’s part of the Pipe as READ while the other process marks it’s part of the Pipe as WRITE.
ProcessState
Process state. Describes the state of the child processes created per invocation of execute_piped_cmd_chain().

Traits§

Builder
Common trait for the two builders.

Functions§

execute_piped_cmd_chain
Runs a command chain. The parent process creates n childs and connects them (stdout => stdin) together via pipes.
update_process_states
Updates the process state values if the pid is done running. Returns true if all pids are finished, otherwise false.