pub fn write_pid_file(socket_dir: &Path, session_id: &str) -> Result<PathBuf>
Write the server PID to a file for tracking