#unix #daemon #daemonize #background #fork

unix-daemonize

Easy unix daemons support for Rust projects

1 unstable release

Uses old Rust 2015

0.1.2 Dec 8, 2015

#7 in #daemonize

Download history 66/week @ 2021-04-04 69/week @ 2021-04-11 56/week @ 2021-04-18 67/week @ 2021-04-25 56/week @ 2021-05-02 95/week @ 2021-05-09 86/week @ 2021-05-16 61/week @ 2021-05-23 98/week @ 2021-05-30 67/week @ 2021-06-06 58/week @ 2021-06-13 39/week @ 2021-06-20 50/week @ 2021-06-27 60/week @ 2021-07-04 92/week @ 2021-07-11 58/week @ 2021-07-18

297 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

~29KB