From: Stanislav Brabec Date: Fri, 25 Mar 2022 08:26:48 +0000 (+0100) Subject: flock: Decribe limitations of flock: deadlock, NFS, CIFS X-Git-Tag: v2.38~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4d9018183ff9a6cd6a77bf33461b60570ec7622;p=thirdparty%2Futil-linux.git flock: Decribe limitations of flock: deadlock, NFS, CIFS 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 Signed-off-by: Karel Zak --- diff --git a/sys-utils/flock.1.adoc b/sys-utils/flock.1.adoc index c645a60f6d..d5b4f10aa9 100644 --- a/sys-utils/flock.1.adoc +++ b/sys-utils/flock.1.adoc @@ -91,6 +91,12 @@ The command uses 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.