]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
flock: document --fcntl
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 8 May 2024 12:29:43 +0000 (14:29 +0200)
committerRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 8 May 2024 13:48:41 +0000 (15:48 +0200)
I'm not sure how much technical detail/symbolic constants to include
in the explanation.

sys-utils/flock.1.adoc

index d5b4f10aa90da0851eec7ce7d986a39ca1c5d8a1..2ffae4380e5a706e09507e6675d84efd174b94a9 100644 (file)
@@ -80,6 +80,11 @@ Drop a lock. This is usually not required, since a lock is automatically dropped
 *-w*, *--wait*, *--timeout* _seconds_::
 Fail if the lock cannot be acquired within _seconds_. Decimal fractional values are allowed. See the *-E* option for the exit status used. The zero number of _seconds_ is interpreted as *--nonblock*.
 
+*--fcntl*::
+Instead of flock(2), apply an fcntl(2) open file description lock (that is, using the F_OFD_SETLK (non-blocking) or F_OFD_SETLKW (blocking) commands). These locks are independent of those applied via flock(2), but, unlike traditional POSIX fcntl() locks (F_SETLK, F_SETLKW), have semantics matching those of flock(2).
+
+This is only available on kernel versions >= 3.15.
+
 *--verbose*::
 Report how long it took to acquire the lock, or why the lock could not be obtained.
 
@@ -130,7 +135,8 @@ Copyright {copyright} 2003-2006 H. Peter Anvin. This is free software; see the s
 
 == SEE ALSO
 
-*flock*(2)
+*flock*(2),
+*fcntl*(2)
 
 include::man-common/bugreports.adoc[]