pub fn daemonize_redirect<PO, PE>(
stdout: Option<PO>,
stderr: Option<PE>,
chdir: ChdirMode,
) -> Result<pid_t, Error>
Expand description
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.