Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: correct A04redirect.ztst so that it works on VSCode
- X-seq: zsh-workers 52332
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: German Riano <griano@xxxxxxxxx>
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: correct A04redirect.ztst so that it works on VSCode
- Date: Wed, 29 Nov 2023 09:45:14 -0800
- Archived-at: <https://zsh.org/workers/52332>
- In-reply-to: <354453770.648505.1701209881415@mail.yahoo.com>
- List-id: <zsh-workers.zsh.org>
- References: <354453770.648505.1701209881415.ref@mail.yahoo.com> <354453770.648505.1701209881415@mail.yahoo.com>
On Tue, Nov 28, 2023 at 2:18 PM German Riano <griano@xxxxxxxxx> wrote:
>
> VSCode sometimes opens certain file descriptors whan you run a terminal nested in it.
Thanks for the report and suggested fix. Question for zsh-workers --
could we just do this?
bad_fd_msg="${$( { exec 9>&-; echo >&9 } 2>&1)##*:}"
That is, don't bother assigning myfd=99 in the first place (the test
script never uses this value of myfd again) and in the subshell
explicitly close an arbitrary FD before trying to use it? The only
restriction seems to be that the descriptor tested must not be 0/1/2
or we won't get the error. Also the pass through the "msg" temporary
file seems unnecessary too?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author