Expand description
A library for building daemon processes.
§Example
use dmon::nix::sys::stat::Mode;
dmon::options()
.user(Some("mydaemon".parse().unwrap()))
.working_directory(Some("/var/lib/mydaemon"))
.pidfile(Some("/run/mydaemon.pid"))
.stdout(Some("mydaemon.out"))
.stderr(Some("mydaemon.err"))
.umask(Some(Mode::from_bits(0o0077).unwrap()))
.daemonize()
.success()
.unwrap();
Re-exports§
pub use nix;
Modules§
- user
- Types for working with users and groups.
Structs§
- Daemon
- Options which can be used to configure the daemon process.
- Parent
- The write end of a pipe to the original parent process.
Constants§
- DEFAULT_
UMASK - The default file mode creation mask value of
027
.
Functions§
- options
- Returns a new Daemon object.