yad 0.2.0

Yet Another Daemonizer is a daemonizing crate to easily, simply, and correctly create legacy daemons
Documentation
  • Coverage
  • 96.49%
    55 out of 57 items documented5 out of 26 items with examples
  • Size
  • Source code size: 40.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.88 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • m-lima/yad
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • m-lima

Yet Another Daemonizer

Github MIT licensed Cargo Documentation

Yet Another Daemonizer is a daemonizing crate to easily, simply, and correctly create legacy daemons.

This crate focuses on manually creating a background process which is not managed by a supervisor such as systemd or launchd. It strives to follow all the best practices to correctly daemonize a process.

Example

use yad::Stdio;

match yad::with_options()
    .stdin(Stdio::Null)
    .stderr(Stdio::Null)
    .stdout(Stdio::output("/var/log/daemon.log"))
    .daemonize()
{
    Ok(_) => println!("I'm a daemon"),
    Err(err) => eprintln!("Failed to launch daemon: {}", err),
}

References