flock.2: In some modern BSDs, fcntl() and flock() locks do interact

So, reword and extend the discussion of this topic in NOTES.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-27 10:14:15 +02:00
parent b1b70920af
commit 05a0fb665a
1 changed files with 9 additions and 1 deletions

View File

@ -151,7 +151,7 @@ Since kernel 2.0,
is implemented as a system call in its own right rather
than being emulated in the GNU C library as a call to
.BR fcntl (2).
This yields true BSD semantics:
This yields classical BSD semantics:
there is no interaction between the types of lock
placed by
.BR flock ()
@ -160,6 +160,14 @@ and
and
.BR flock ()
does not detect deadlock.
(Note, however, that on some modern BSDs,
.\" E.g., according to the flock(2) man page, FreeBSD since at least 5.3
.BR flock ()
and
.BR fcntl (2)
locks
.I do
interact with one another.)
.PP
In Linux kernels up to 2.6.11,
.BR flock ()