pub fn write_self_pid() -> Result<(), PidError>
Write the current process’s PID to the daemon PID file.
Returns PidError::Io if the file can’t be written.
PidError::Io