From: Rasmus Villemoes Date: Wed, 8 May 2024 12:29:43 +0000 (+0200) Subject: flock: document --fcntl X-Git-Tag: v2.42-start~352^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e59520cd66a7fff830290fdfdde32e944d250aee;p=thirdparty%2Futil-linux.git flock: document --fcntl I'm not sure how much technical detail/symbolic constants to include in the explanation. --- diff --git a/sys-utils/flock.1.adoc b/sys-utils/flock.1.adoc index d5b4f10aa..2ffae4380 100644 --- a/sys-utils/flock.1.adoc +++ b/sys-utils/flock.1.adoc @@ -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[]