Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug: reading from tty inside process substitution



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