Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Weird issue with pipeviewer and multiple pipes
- X-seq: zsh-workers 38414
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Weird issue with pipeviewer and multiple pipes
- Date: Fri, 6 May 2016 22:35:20 +0100
- In-reply-to: <CAH+w=7b+tKnvfv1ip6ykNW4Oh_BQSiXnGwGMQzhvfi=Wrq6DXg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <ufaa8k6ei8t.fsf@epithumia.math.uh.edu> <CAH+w=7b+tKnvfv1ip6ykNW4Oh_BQSiXnGwGMQzhvfi=Wrq6DXg@mail.gmail.com>
On Tue, 3 May 2016 20:56:14 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>On Tue, May 3, 2016 at 6:15 PM, Jaron L Tibbitts III <tibbs@xxxxxxxxxxx> wrote:
> >
> > [2] + 11459 done echo 1 |
> > 11461 suspended (tty output) pv -l -s $(echo 1) |
> > 11462 interrupt cat
>
> I don't know why the $(echo) makes any
> difference to it receiving the TTOU in the first place.
Actually, it looks like This Can't Possibly Happen, since $(echo 1) is
over and done with by the time the pv is started; we've got the output,
closed the fd, and waited for the process to finish (by PID). So there
is some weird lingering side effect.
> All of these also avoid the problem:
>
> echo 1 | { trap '' TTOU ; pv -p -s $(echo 1) } | cat
> echo 1 | pv -p -s $(echo 1) 2>/dev/tty | cat
> echo 1 | { x=$(echo 1); pv -p -s $x } | cat
Also, a substitution of the form $(<file) doesn't do it, either. That's
probably not surprising as there's no extra process there, but it does
leave not that much code in getoutput() to be causing it. I tried
commenting out entersubsh() to see if the terminal handling in there
maede a difference, but it didn't. In fact, even pruning down
the behaviour in the child to simply printing something didn't
have any effect.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author