|
ginnOS
The reference: libc, the libraries and the kernel
|
flock: advisory locks on whole files. More...
Go to the source code of this file.
Macros | |
| #define | LOCK_SH 1 |
| #define | LOCK_EX 2 |
| #define | LOCK_NB 4 |
| #define | LOCK_UN 8 |
Functions | |
| int | flock (int fd, int operation) |
| take, change or release the lock of the file open as fd. | |
flock: advisory locks on whole files.
a lock belongs to the open file (dup and fork share it) and goes when the file is unlocked or its last descriptor closes. the locks only stop other flock calls, not reads or writes.
| #define LOCK_SH 1 |
| #define LOCK_EX 2 |
| #define LOCK_NB 4 |
| #define LOCK_UN 8 |
| int flock | ( | int | fd, |
| int | operation ) |
take, change or release the lock of the file open as fd.