flock

Apply or remove an advisory lock on an open file

version(linux)
extern (C) nothrow @nogc @trusted
int
flock
(
int fd
,)

Parameters

fd int

file to apply or remove lock from

operation int

lock operation to perform

Return Value

Type: int

0 on success, -1 on failure, with .errno set appropriately.

Meta