Function unix_daemonize::daemonize_redirect[][src]

pub fn daemonize_redirect<PO, PE>(
    stdout: Option<PO>,
    stderr: Option<PE>,
    chdir: ChdirMode
) -> Result<pid_t, Error> where
    PO: AsRef<Path>,
    PE: AsRef<Path>, 

Performs program daemonizing with optional redirection for STDIN and STDOUT. If the redirection parameter is None, then stream will be redirected to /dev/null, otherwise it will be redirected to the file provided.

Returns the new process id after all forks.