pub fn daemonize(pid_file: &Path) -> Result<(), String>Expand description
Daemonize the current process.
After this call returns in the grandchild process, the process is:
- Running as a session leader with no controlling terminal
- In the root directory (/)
- With umask 0
- With stdin/stdout/stderr redirected to /dev/null
- With a PID file written to
pid_file
The parent and intermediate child processes exit with status 0.