1 unstable release

Uses old Rust 2015

0.1.2 Dec 8, 2015

#10 in #daemonize

Download history 53/week @ 2024-07-21 77/week @ 2024-07-28 46/week @ 2024-08-04 39/week @ 2024-08-11 63/week @ 2024-08-18 69/week @ 2024-08-25 68/week @ 2024-09-01 76/week @ 2024-09-08 125/week @ 2024-09-15 159/week @ 2024-09-22 147/week @ 2024-09-29 174/week @ 2024-10-06 60/week @ 2024-10-13 106/week @ 2024-10-20 54/week @ 2024-10-27 86/week @ 2024-11-03

308 downloads per month
Used in 2 crates

MIT license

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

~44KB