Skip to main content

record_pid

Function record_pid 

Source
fn record_pid(file: &mut File)
Expand description

Stamp our PID into the (now exclusively-held) lockfile so a would-be second instance can name us in its refusal. Best-effort: a failed write doesn’t void the lock - the flock is what enforces single-instance; the PID is only for the message.