1 unstable release

Uses old Rust 2015

0.1.2 Dec 8, 2015

#9 in #daemonize

Download history 108/week @ 2024-03-29 57/week @ 2024-04-05 56/week @ 2024-04-12 84/week @ 2024-04-19 83/week @ 2024-04-26 50/week @ 2024-05-03 57/week @ 2024-05-10 44/week @ 2024-05-17 66/week @ 2024-05-24 76/week @ 2024-05-31 50/week @ 2024-06-07 45/week @ 2024-06-14 54/week @ 2024-06-21 37/week @ 2024-06-28 29/week @ 2024-07-05 64/week @ 2024-07-12

188 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

~43KB