Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: reading from tty inside process substitution
- X-seq: zsh-workers 52306
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug: reading from tty inside process substitution
- Date: Tue, 14 Nov 2023 21:00:59 -0800
- Archived-at: <https://zsh.org/workers/52306>
- In-reply-to: <CAH+w=7abshTC3bJC6YRJOszsyzJEHbBLYZafzdGd4p8J8LK5xg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAA=-s3xCf4wx826U8jEjO_j5-1kcTi8v2=VZPiabKMo-meKq0Q@mail.gmail.com> <CAH+w=7ZztRXt7R9fDK=yb1=fcvjwjiUGo98j73BgBG7NzWE+iw@mail.gmail.com> <CAH+w=7ZVJeo==zJjUi7OaUWt5nRqhif2ApTk5z5a0PD9mONc4Q@mail.gmail.com> <CAH+w=7abshTC3bJC6YRJOszsyzJEHbBLYZafzdGd4p8J8LK5xg@mail.gmail.com>
A couple of other things about this ...
On Tue, Nov 14, 2023 at 8:42 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Nov 14, 2023 at 7:33 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > > read foo < <(read bar; echo $bar) </dev/tty
The input of the process substitution is closed, so "read bar" does
nothing and "echo $bar" just prints a newline, which satisfies "read
foo".
However, the multio loop is still reading /dev/tty and won't discover
until its I/O buffers fill up that "read foo" isn't consuming any more
input.
> something is still ignoring TSTP (^z), perhaps because "read foo" is
> in the top-level interactive shell, so this can't be suspended.
The use of ESUB_NOMONITOR in the previous patch causes the multio loop
to ignore TSTP, so maybe there's another tweak to be done there, but I
think the reason the whole thing is not stop-able may be because "read
foo" has already finished.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author