Skip to main content

stale_locks

Function stale_locks 

Source
pub fn stale_locks(dir: &Path) -> Vec<StaleLock>
Expand description

The <id>.lock files in dir that are not held by a live process.

The counterpart of held_locks: that one answers “which sessions are in use”, this one answers “which leftovers can be cleaned up”. A file whose flock is free is a file whose holder died, because the kernel releases the lock then and nothing removes the file.