Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
core.sys.linux.sys.file
D header file for Linux file ops.
License:
Authors:
Nemanja Boric
- enum int
LOCK_SH
; - Shared lock
- enum int
LOCK_EX
; - Exclusive lock
- enum int
LOCK_UN
; - Unlock
- enum int
LOCK_NB
; - Don't block when locking. Can be OR'd into one of the above.
- nothrow @nogc @trusted int
flock
(intfd
, intoperation
); - Apply or remove an advisory lock on an open fileParameters:
int fd
file to apply or remove lock from int operation
lock operation to perform Returns:0 on success, -1 on failure, with .errno set appropriately.
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Apr 28 06:59:40 2025