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

Re: zsh 5.6 regression: a pipe sometimes yields a TTOU signal



On Wed, 5 Sep 2018 11:03:39 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> After the upgrade to zsh 5.6 under Debian/unstable, I sometimes get:
> 
> ypig:~> dpkg -l|gr mercurial  
> ii  mercurial                                                   4.7-1                                    amd64        easy-to-use, scalable distributed version control system
> ii  mercurial-common                                            4.7-1                                    all          easy-to-use, scalable distributed version control system (common files)
> zsh: exit 150
> zsh: suspended (tty output)  pager-wrapper grep --color=always --line-buffered -E mercurial
> ypig:~[TTOU]>  
> 
> where
> 
> gr: aliased to pager-wrapper grep --color=always --line-buffered -E
> 
> and pager-wrapper is:
> 
> pager-wrapper () {
>         local -a opt
>         while [[ $1 == -* ]]
>         do
>                 opt+=$1 
>                 shift
>         done
>         if [[ -t 1 ]]
>         then
>                 $@ $opt | less -+c -FRX
>         else
>                 $@
>         fi
> }

I managed to get this to happen once in a set of tests.

With

(echo mercurial) | gr mercurial

I always get

zsh: suspended (tty output)  pager-wrapper grep --color=always --line-buffered -E mercurial

This isn't going to be fixed quickly (or, quite likely, at all without
creating different knock-on effects, as changes here always do). Anyone
wanting to volunteer to look after job control would be very welcome ---
currently like so much of the shell it's down to when Bart and I
get a chance to look, as it has been for several decades now, which
isn't a sustainable position.

It's presumably down to the first job exiting and the other part
of the pipeline not getting control quickly enough.

pws




Messages sorted by: Reverse Date, Date, Thread, Author