49 lines
2.4 KiB
Diff
49 lines
2.4 KiB
Diff
From f4d9018183ff9a6cd6a77bf33461b60570ec7622 Mon Sep 17 00:00:00 2001
|
|
From: Stanislav Brabec <sbrabec@suse.cz>
|
|
Date: Fri, 25 Mar 2022 09:26:48 +0100
|
|
Subject: 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 <sbrabec@suse.cz>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
---
|
|
sys-utils/flock.1.adoc | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
Index: util-linux-2.37.4/sys-utils/flock.1.adoc
|
|
===================================================================
|
|
--- util-linux-2.37.4.orig/sys-utils/flock.1.adoc
|
|
+++ util-linux-2.37.4/sys-utils/flock.1.adoc
|
|
@@ -95,6 +95,12 @@ The command uses <sysexits.h> exit statu
|
|
|
|
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.
|
|
Index: util-linux-2.37.4/sys-utils/flock.1
|
|
===================================================================
|
|
--- util-linux-2.37.4.orig/sys-utils/flock.1
|
|
+++ util-linux-2.37.4/sys-utils/flock.1
|
|
@@ -109,6 +109,11 @@ Display help text and exit.
|
|
The command uses <sysexits.h> exit status values for everything, except when using either of the options \fB\-n\fP or \fB\-w\fP which report a failure to acquire the lock with an exit status given by the \fB\-E\fP option, or 1 by default. The exit status given by \fB\-E\fP has to be in the range of 0 to 255.
|
|
.sp
|
|
When using the \fIcommand\fP variant, and executing the child worked, then the exit status is that of the child command.
|
|
+.SH "NOTES"
|
|
+.sp
|
|
+\fBflock\fP does not detect deadlock. See \fBflock\fP(2) for details.
|
|
+.sp
|
|
+Some file systems (e. g. NFS and CIFS) have a limited implementation of \fBflock\fP(2) and flock may always fail. For details see \fBflock\fP(2), \fBnfs\fP(5) and \fBmount.cifs\fP(8). Depending on mount options, flock can always fail there.
|
|
.SH "EXAMPLES"
|
|
.sp
|
|
Note that "shell> " in examples is a command line prompt.
|
|
|