Skip to main content

remove_pidfile_if_names

Function remove_pidfile_if_names 

Source
pub(crate) fn remove_pidfile_if_names(path: &Path, pid: pid_t) -> bool
Expand description

Remove path only when it still names pid — never a file that has been overwritten by (or always belonged to) another cluster. A pidfile IS the waratah stop handle, so deleting someone else’s leaves their live cluster unstoppable. Returns whether a file was removed.