about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorClinton Bunch <cdb_zsh@zentaur.org>2019-03-22 17:11:19 -0500
committerdana <dana@dana.is>2019-03-22 17:11:19 -0500
commitea8d3ab3e41f600a3564a8d92bd630468a1af036 (patch)
tree1071589108729c99cc80563c6f73000a204dc5e8 /Doc
parent5267bdc4ef91c1609bf0499861cc46f63e9e5784 (diff)
downloadzsh-ea8d3ab3e41f600a3564a8d92bd630468a1af036.tar.gz
zsh-ea8d3ab3e41f600a3564a8d92bd630468a1af036.tar.xz
zsh-ea8d3ab3e41f600a3564a8d92bd630468a1af036.zip
44156 (tweaked): zsh/system: Add note about potential flock side-effects
(Minor adjustments to wording and formatting)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/mod_system.yo7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/Zsh/mod_system.yo b/Doc/Zsh/mod_system.yo
index a27bab47f..3a85e760f 100644
--- a/Doc/Zsh/mod_system.yo
+++ b/Doc/Zsh/mod_system.yo
@@ -177,8 +177,11 @@ locked by opening a file descriptor to the file and applying a lock to
 the file descriptor.  The lock terminates when the shell process that
 created the lock exits; it is therefore often convenient to create file
 locks within subshells, since the lock is automatically released when
-the subshell exits.  Status 0 is returned if the lock succeeds, else
-status 1.
+the subshell exits.  Note that use of the tt(print) builtin with the
+tt(-u) option will, as a side effect, release the lock, as will redirection
+to the file in the shell holding the lock.  To work around this use a
+subshell, e.g. `tt((print message) >> )var(file)'.  Status 0 is
+returned if the lock succeeds, else status 1.
 
 In the second form the file descriptor given by the arithmetic
 expression var(fd_expr) is closed, releasing a lock.  The file descriptor