summaryrefslogtreecommitdiff
path: root/Doc/Zsh/mod_system.yo
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2020-02-14 01:58:20 +0100
committerAxel Beckert <abe@deuxchevaux.org>2020-02-14 01:58:20 +0100
commitbfc5d42735c1660263904ec5254cccf539a0a458 (patch)
tree9bbb81b4a53941427e6f9e65ae55027d9108df8c /Doc/Zsh/mod_system.yo
parent74561cc51b8867e43cb2937ab2edfb36e2a829bf (diff)
parent643de931640e01aa246723d2038328ef33737965 (diff)
downloadzsh-bfc5d42735c1660263904ec5254cccf539a0a458.tar.gz
zsh-bfc5d42735c1660263904ec5254cccf539a0a458.zip
Merge tag 'zsh-5.7.1-test-3' into debian
Test release: 5.7.1-test-3
Diffstat (limited to 'Doc/Zsh/mod_system.yo')
-rw-r--r--Doc/Zsh/mod_system.yo11
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/Zsh/mod_system.yo b/Doc/Zsh/mod_system.yo
index a27bab47f..6292af071 100644
--- a/Doc/Zsh/mod_system.yo
+++ b/Doc/Zsh/mod_system.yo
@@ -45,7 +45,9 @@ specified as a comma-separated list. The following is a list of possible
options. Note that, depending on the system, some may not be available.
startitem()
item(tt(cloexec))(
-mark file to be closed when other programs are executed
+mark file to be closed when other programs are executed (else
+the file descriptor remains open in subshells and forked external
+executables)
)
xitem(tt(create))
item(tt(creat))(
@@ -177,8 +179,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