Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
From: Jason L Tibbitts III <tibbs@math.uh.edu>
To: zsh-workers@zsh.org
Subject: Weird issue with pipeviewer and multiple pipes
Date: Tue, 03 May 2016 20:15:14 -0500
Message-ID: <ufaa8k6ei8t.fsf@epithumia.math.uh.edu>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Seq: zsh-workers 38397

Someone brought this up on IRC; I thought I'd bring it to a larger
audience.  

Pipeviewer (pv) is a little program that sits in a pipeline, passes data
through, and outputs some progress information.
  http://www.ivarch.com/programs/pv.shtml
I didn't know about it until today, but it's kind of neat.  It's in most
distros/repositories/package managers/whatever.

Run this:
  echo 1 | pv -l -s $(echo 1)

Should give '1' and a progress bar.  Now tack on "|cat".  For me that
hangs.  ctrl-Z does nothing.  ctrl-C seems to do what I'd expect ctrl-Z
to do:

[2]  + 11459 done                    echo 1 |
       11461 suspended (tty output)  pv -l -s $(echo 1) |
       11462 interrupt               cat

If I type fg, the shell is pretty much hung.  You have to kill -9 the pv
process either way to get rid of the job.  (Lesser kills don't seem to
work.)

Could certainly be a bug in pv, but it's definitely weird and I'd just
dismiss it except that other shells seem to have no problems.

 - J<

