1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

fcntl-linux.h: add new definitions and manual updates for open file description locks

Open file description locks have been merged into the Linux kernel for
v3.15.  Add the appropriate command-value definitions and an update to
the manual that describes their usage.
This commit is contained in:
Jeff Layton
2014-07-23 14:21:05 -04:00
committed by Carlos O'Donell
parent cc5fb300fc
commit 0961f7e1e3
5 changed files with 361 additions and 17 deletions

View File

@ -117,6 +117,23 @@
# define F_SETLKW64 14 /* Set record locking info (blocking). */
#endif
/* open file description locks.
Usually record locks held by a process are released on *any* close and are
not inherited across a fork.
These cmd values will set locks that conflict with process-associated record
locks, but are "owned" by the opened file description, not the process.
This means that they are inherited across fork or clone with CLONE_FILES
like BSD (flock) locks, and they are only released automatically when the
last reference to the the file description against which they were acquired
is put. */
#ifdef __USE_GNU
# define F_OFD_GETLK 36
# define F_OFD_SETLK 37
# define F_OFD_SETLKW 38
#endif
#ifdef __USE_LARGEFILE64
# define O_LARGEFILE __O_LARGEFILE
#endif