]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
flock: Decribe limitations of flock: deadlock, NFS, CIFS
authorStanislav Brabec <sbrabec@suse.cz>
Fri, 25 Mar 2022 08:26:48 +0000 (09:26 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Mar 2022 08:26:48 +0000 (09:26 +0100)
The flock(1) does not refer to limitations of flock(2). Provide an
documentation entry point for solving of problems with flock on NFS
and CIFS and mention risk of deadlock.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/flock.1.adoc

index c645a60f6d2ce09e82639aedc8beef1fc50f0de1..d5b4f10aa90da0851eec7ce7d986a39ca1c5d8a1 100644 (file)
@@ -91,6 +91,12 @@ The command uses <sysexits.h> exit status values for everything, except when usi
 
 When using the _command_ variant, and executing the child worked, then the exit status is that of the child command.
 
+== NOTES
+
+*flock* does not detect deadlock. See *flock*(2) for details.
+
+Some file systems (e. g. NFS and CIFS) have a limited implementation of *flock*(2) and flock may always fail. For details see *flock*(2), *nfs*(5) and *mount.cifs*(8). Depending on mount options, flock can always fail there.
+
 == EXAMPLES
 
 Note that "shell> " in examples is a command line prompt.