psutil::pidfile
pub fn write_pidfile<P>(path: P) -> Result<()> where P: AsRef<Path>,
Writes the PID of the current process to a file.