Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [QUESTION] Inheritance of file descriptors in <( ... ) construct
- X-seq: zsh-workers 42860
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: dana <dana@xxxxxxx>
- Subject: Re: [QUESTION] Inheritance of file descriptors in <( ... ) construct
- Date: Sat, 26 May 2018 10:52:58 -0700
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=07HzspeFgTXIqpSU/ovhpa64mJPrW8EV+NFKdDZjSKo=; b=Ee2R0znEP20u7FNIzoXXk3B6NqAXRfU8R+M2fBDbYdQBL/39XSP6aQcoz8AKqjUOng ww+f/FEXACtomLFPMsHzBKUimWpOcX/369Xws6rrqU42ymfLK39HMLj8ilv7+YNbeD7a kKMeE59XmuQhTvy2JiV3z0ECjEipCL/hclK/SFBXrRVHCN8laxXsFR2pUgpRUIkDO++k TX7nTnYHWAf4owFv2u6xRZhLm6NQ8VDFP8Rq0dLD5E8mTVgZuUdGyIVF+L0hvPm/iJAr T7YYCw0IVKFFhaJg7bzNV4uXFVqbxquFIYOpNnsZhrc/2pt/DBcXa+YqKtn0DF0o55VB WlhA==
- In-reply-to: <B78C1DFA-4925-473E-9A9F-DFF3695F2EEC@dana.is>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <B78C1DFA-4925-473E-9A9F-DFF3695F2EEC@dana.is>
On Fri, May 25, 2018 at 5:01 PM, dana <dana@xxxxxxx> 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().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author