qpidfile 0.9.2

A minimal library for managing a process' pidfile.
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 2.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 236.95 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • openqrnch/qpidfile
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • qrnch-jan

A simple representation of a "pidfile".

Creates a pidfile on creation and automatically remove it on termination.

fn main() {
  let pidfile = Pidfile::new("myserver.pid");
  // .. run server ..

  // On termination the Pidfile will automatically be removed.
}

Be mindful of the Drop trait caveats; for instance calling std::process::exit() will cause Drop traits not to run.