Function base::sys::linux::flock

source ·
pub fn flock<F: AsRawDescriptor>(
    file: &F,
    op: FlockOperation,
    nonblocking: bool
) -> Result<()>
Expand description

Safe wrapper for flock(2) with the operation op and optionally nonblocking. The lock will be dropped automatically when file is dropped.