[−][src]Crate unix_exec_output_catcher
This library lets you execute a child process and catch its output (stdout and stderr). This is useful if you want to use the output from a specific command and transform it in your program.
⚠️ Difference to std::process::Command 🚨
std::process::Command
does the same in the standard library but with one exception:
My library gives you access to stdout, stderr, and "stdcombined". This way you get all output
lines in the order they appeared. That's the unique feature of this crate.
Structs
ProcessOutput | Holds the text output lines for stdout and stderr of the executed child process. The stdcombined-property holds both combined in the order they appeared. |
Functions
fork_exec_and_catch | Executes a program in a child process and returns the output of STDOUT and STDERR line by line in a vector. Be aware that this is blocking and static! So if your executable produces 1GB of output text, the data of the vectors of the returned structs are 1GB in size. |