pub fn write_pid_file(path: &str) -> Result<()>Expand description
Write a PID file atomically using O_CREAT | O_EXCL to prevent TOCTOU races.
ยงErrors
Returns an error if the PID file directory cannot be created, the file already exists, or the file cannot be written.