Expand description
!! API not stabilized - lacking documentation - do not use !!
§About
Pipelight_exec is a crate for easy process management. It makes a best effort to leverage standard library.
Features:
-
Spawn and Kill background processes.
-
Display a detached running process standard outputs.
-
Get process execution time.
§Example
Spawn a simple process in the background. or in other words, execute a process and detach it.
It keeps running after parent process exit and terminal exit.
let mut process = Process::new("echo test");
process.run_detached()?;
Pipe the process standards outputs to the parent.
let mut process = Process::new("echo test");
process.run_detached()?;
Find a running process, with handy search options.
let process_finder = Finder::new().seed("my_proc").root("/my/dir").search()?;
let pid = 1792;
let process_finder = Finder::new().pid(&pid).search()?;
Modules§
Structs§
- A struct that stores the procees standards input and outputs into human readable strings.
- A struct that stores the process attributes for further access and manipulation.
- A convenience struct to store the process status and its duration.
Enums§
- An enum for the different possible process state.
Traits§
- In pipelight, many are the structs and enum substructs that have a status. This trait is to query the deepenth status in a more standardize way.