util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] flock(1): Decribe limitations of flock: deadlock, NFS, CIFS
@ 2022-03-24  0:27 Stanislav Brabec
  2022-03-25  8:28 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Brabec @ 2022-03-24  0:27 UTC (permalink / raw)
  To: util-linux

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>
---
  sys-utils/flock.1.adoc | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/sys-utils/flock.1.adoc b/sys-utils/flock.1.adoc
index c645a60f6..d5b4f10aa 100644
--- a/sys-utils/flock.1.adoc
+++ b/sys-utils/flock.1.adoc
@@ -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.
-- 
2.35.1

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@suse.com
Křižíkova 148/34 (Corso IIa)                    tel: +420 284 084 060
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] flock(1): Decribe limitations of flock: deadlock, NFS, CIFS
  2022-03-24  0:27 [PATCH] flock(1): Decribe limitations of flock: deadlock, NFS, CIFS Stanislav Brabec
@ 2022-03-25  8:28 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2022-03-25  8:28 UTC (permalink / raw)
  To: Stanislav Brabec; +Cc: util-linux

On Thu, Mar 24, 2022 at 01:27:14AM +0100, Stanislav Brabec wrote:
>  sys-utils/flock.1.adoc | 6 ++++++
>  1 file changed, 6 insertions(+)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-25  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24  0:27 [PATCH] flock(1): Decribe limitations of flock: deadlock, NFS, CIFS Stanislav Brabec
2022-03-25  8:28 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).