Module sys/lock
sys/lock
Advisory file locking.
Synchronous wrapper for POSIX flock().
Returns 0 on success, -errno on failure.
Operations can be OR'd with LOCK_NB for non-blocking.
LOCK_NB returns -EWOULDBLOCK (-11) if the lock cannot be acquired immediately.
Functions
flock
function
fn(fd : i32, operation : i32) -> i32
Parameters
| Name | Type | Notes |
|---|---|---|
fd | i32 | |
operation | i32 |
Returns: i32