From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: How to misplace an entire pipeline
Date: Sat, 13 Aug 2011 13:15:53 -0700 [thread overview]
Message-ID: <110813131553.ZM20724@torch.brasslantern.com> (raw)
In-Reply-To: <110813115208.ZM20513@torch.brasslantern.com>
Here's a not-new bug (occurs in, e.g., 4.2.0) that I found while trying
to test the preceding patch for side-effects.
torch% sleep 200 | sleep 300 | while :; do read '?GO:' < /dev/tty; done
(rapid infinite loop printing "GO:" repeatedly)
^Z
zsh: suspended sleep 200 | sleep 300 |
zsh: running while :; do; read '?GO:' < /dev/tty; done
torch%
Note that it says the "while" loop is running, even though control has
returned to the top-level prompt.
If you bring this job back into the foreground, it now properly blocks
on the "read":
torch% fg
[1] + continued sleep 200 | sleep 300 | while :; do; read '?GO:' < /dev/tty;
done
GO:
Again, my patch didn't change this behavior, it's been this way for at
least several revisions.
It works somewhat better with "read -q".
In 4.2.0, at the prompt printed by read, ^Z is silently ignored. Here is
what happens with ^C instead:
torch% sleep 200 | sleep 300 | while :; do read -q '?GO:' ; done
GO:
torch% jobs
[1] running sleep 200 | sleep 300
torch% fg
fg: no current job
torch% %1
[1] + running sleep 200 | sleep 300
(These are now in the foreground.)
With my patch from 29677, 4.3.12-dev-1 still silently ignores the ^Z,
but now:
torch% sleep 200 | sleep 300 | while :; do read -q '?GO:' ; done
GO:%
torch%
[1] interrupt sleep 200 | sleep 300
torch%
Which seems to make more sense.
next prev parent reply other threads:[~2011-08-13 20:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 3:31 Bart Schaefer
2011-08-07 17:50 ` Peter Stephenson
2011-08-07 21:43 ` Bart Schaefer
2011-08-08 4:05 ` Bart Schaefer
2011-08-08 18:27 ` Peter Stephenson
2011-08-09 6:10 ` Bart Schaefer
2011-08-09 20:19 ` Peter Stephenson
2011-08-13 18:52 ` Bart Schaefer
2011-08-13 20:15 ` Bart Schaefer [this message]
2011-09-12 13:51 ` Alexey I. Froloff
2011-09-12 16:03 ` Bart Schaefer
2011-09-12 16:18 ` Bart Schaefer
2011-09-12 16:35 ` Peter Stephenson
2011-09-15 14:57 ` Alexey I. Froloff
2011-09-16 16:16 ` Bart Schaefer
2011-09-12 16:27 ` Alexey I. Froloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=110813131553.ZM20724@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).