Crate yad[][src]

Expand description

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.


use yad::options::Stdio;

match yad::with_options()
    Ok(_) => println!("I'm a daemon"),
    Err(err) => eprintln!("Failed to launch daemon: {}", err),



Configuration for starting the daemon.


Allows reporting back to the invoker process if the initialization of the service was successful or not.


Wrapped errors that can happen after the daemon has forked.

Errors that can happen while daemonizing.


Starts the daemon with default options.

Starts the daemon with the given options.