3 releases

0.2.8 Aug 25, 2024
0.2.5 Aug 20, 2024
0.2.4 Aug 19, 2024

#225 in Operating systems

Download history 248/week @ 2024-08-17 133/week @ 2024-08-24 5/week @ 2024-08-31

386 downloads per month

GPL-2.0-only

41KB
808 lines

pipelight_exec crate

Crate from pipelight an automation cli.


lib.rs:

!! 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.

  • Interoperability with rustix and sysinfo crates.

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()?;

Dependencies

~29–43MB
~771K SLoC