vorarbeiter 0.1.0

A small process supervisor that shutdowns child processes
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented2 out of 6 items with examples
  • Size
  • Source code size: 6.31 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mbr/vorarbeiter-rs
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mbr

Vorarbeiter, a small process supervisor

vorarbeiter::Supervisor shuts down processes it owns on Drop by sending a SIGTERM first, followed by a SIGKILL:

use std::process;

// The default kill timeout is 10 seconds, which is fine here.
let mut supervisor = vorarbeiter::Supervisor::default();

// Spawns three new child processes and adds them to the supervisor.
for _ in 0..3 {
    let child = process::Command::new("my-subcommand").spawn().unwrap();
    supervisor.add_child(child);
}

// Terminate all child processes.
drop(supervisor);

See the documentation for details.