Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: reading from tty inside process substitution
- X-seq: zsh-workers 52310
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug: reading from tty inside process substitution
- Date: Wed, 15 Nov 2023 20:58:28 -0800
- Archived-at: <https://zsh.org/workers/52310>
- In-reply-to: <CAH+w=7Y6Tm=Ri4xTR_m4cEy3Sp+Be1Nx0B62Tj2mD8L8ObHtzQ@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> <CAH+w=7Y6Tm=Ri4xTR_m4cEy3Sp+Be1Nx0B62Tj2mD8L8ObHtzQ@mail.gmail.com>
I've committed the patch so far, but another case occurred to me.
On Tue, Nov 14, 2023 at 9:00 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 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.
Replace /dev/tty with /dev/zero and we're back to the unkillable loop.
It's been this way since workers/12222 in July 2000. The bug report
to which that was a response had to do with a write loop (emulating
"tee" to multiple outputs). Do we actually need to discard EINTR on
the read loop, or did that just get put in for symmetry?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author