Expand description
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.