By name only, this function _sounds_ like a getter. Perhaps `write_pid_file`?