1 unstable release
Uses old Rust 2015
0.1.2 | Dec 8, 2015 |
---|
#9 in #daemonize
188 downloads per month
Used in 2 crates
5KB
95 lines
unix-daemonize rust crate
Summary
Easy to use daemonizing for rust programs in unix enviroment.
Using unix-daemonize
Add to Cargo.toml
:
[dependencies]
unix-daemonize = "0.1"
To src/main.rs
:
extern crate unix_daemonize;
use unix_daemonize::{daemonize_redirect, ChdirMode};
fn main() {
daemonize_redirect(Some("/tmp/stdout.log"), Some("/tmp/stderr.log"), ChdirMode::ChdirRoot).unwrap()
}
lib.rs
:
Easy to use daemonizing for rust programs in unix enviroment.
daemonize_redirect(Some("stdout.log"), Some("stderr.log"), ChdirMode::ChdirRoot).unwrap();
See examples for sample program.
Dependencies
~43KB