From: Bart Schaefer <schaefer@brasslantern.com>
To: dana <dana@dana.is>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: [QUESTION] Inheritance of file descriptors in <( ... ) construct
Date: Sat, 26 May 2018 10:52:58 -0700 [thread overview]
Message-ID: <CAH+w=7YgL7yCO_N5Hwo4uZ2H_QEwawssh88nuoaGMrNPTLd3Xg@mail.gmail.com> (raw)
In-Reply-To: <B78C1DFA-4925-473E-9A9F-DFF3695F2EEC@dana.is>
On Fri, May 25, 2018 at 5:01 PM, dana <dana@dana.is> wrote:
>
> I'm wondering about the following behaviour:
>
> % ( fd=; exec {fd}>&2; : $( print foo >&$fd ) )
> foo
> % ( fd=; exec {fd}>&2; : =( print foo >&$fd ) )
> foo
> % ( fd=; exec {fd}>&2; : <( print foo >&$fd ) )
> zsh: 12: bad file descriptor
This looks similar to the thread around workers/42708 ... except that
instead of not closing the descriptor created by <(...) we also need
to not close FDT_EXTERNAL descriptors when spawning <(...).
There doesn't seem to be any straightforward way to do this with the
current implementation of closem().
prev parent reply other threads:[~2018-05-26 17:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 0:01 dana
2018-05-26 17:52 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7YgL7yCO_N5Hwo4uZ2H_QEwawssh88nuoaGMrNPTLd3Xg@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=dana@dana.is \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).