Skip to main content

write_pid_file

Function write_pid_file 

Source
pub fn write_pid_file(path: &Path, pid: u32) -> Result<()>
Expand description

Write a process ID to a PID file with restricted permissions.

Args:

  • path: Filesystem path for the PID file.
  • pid: Process ID to write.

Usage:

write_pid_file(&pid_path, std::process::id())?;