From 3bdf4d6641fb34d1c2f130abddb847169a793afe Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 2 Jul 2019 13:42:53 +0100 Subject: 44480: Don't automatically close externally visible file descroptors. These are descriptors marked FDT_EXTERNAL. Make all sysopen'ed file descriptors FDT_EXTERNAL. Make =(...) call closem() consistent with other substitutions. Document file descriptors are left open. --- Doc/Zsh/redirect.yo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Doc/Zsh/redirect.yo') diff --git a/Doc/Zsh/redirect.yo b/Doc/Zsh/redirect.yo index 7e38cd0c3..13496d8d3 100644 --- a/Doc/Zsh/redirect.yo +++ b/Doc/Zsh/redirect.yo @@ -182,7 +182,8 @@ indent(... tt({myfd}>&1)) This opens a new file descriptor that is a duplicate of file descriptor 1 and sets the parameter tt(myfd) to the number of the file descriptor, which will be at least 10. The new file descriptor can be written to using -the syntax tt(>&$myfd). +the syntax tt(>&$myfd). The file descriptor remains open in subshells +and forked external executables. The syntax tt({)var(varid)tt(}>&-), for example tt({myfd}>&-), may be used to close a file descriptor opened in this fashion. Note that the -- cgit 1.4.1