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

Re: Bug: reading from tty inside process substitution



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