pub fn write_pid(session_key: &str) -> Result<()>
Write the current process PID to the pid file for a session key.