zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Another bug when suspending pipelines
Date: Fri, 16 Sep 2016 13:33:02 +0100	[thread overview]
Message-ID: <20160916133302.1f447ca0@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CGME20160916123306eucas1p1f4349b727ebdfb64b4947c9d210457e1@eucas1p1.samsung.com>

To check my code for the other pipeline suspending problem, I came up
with a command designed to check different cases, in particular where
the left of the pipeline was still running:

  (sleep 5; print foo) | { sleep 5; read bar; print $bar; }

Suspending this sometimes doesn't work: the ^Z is delayed and gets
relayed to the parent shell.  The "sometimes" suggests this is a race
--- note this is the same oldish machine that was showing up the second
variant of the problems I've just been looking at, so this might not be
widely visible (don't know yet).

Sometimes even if it suspends, it stops again when you fg it, then
the second fg allows it to complete.

I'm still 90% convinced there's no or very limited interaction with my
recent patches, however.  I can see the same ranges of behaviours both
with and without.  The problem seems the same in 5.2, as well, despite
what I originally thought, sporadic enough to be hard to be sure.

I have no handle on what aspect of this is problematic, but I don't
see anything about the shell code above that suggests this is a
particularly hairy case.

(It would be nice to have a set of test cases for this code, even if we
run them by hand.)

pws


       reply	other threads:[~2016-09-16 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20160916123306eucas1p1f4349b727ebdfb64b4947c9d210457e1@eucas1p1.samsung.com>
2016-09-16 12:33 ` Peter Stephenson [this message]
     [not found]   ` <CGME20160916164752eucas1p1add32b4825e126def7b3317c07731342@eucas1p1.samsung.com>
2016-09-16 16:47     ` Peter Stephenson
2016-09-16 18:38   ` Bart Schaefer
2016-09-16 20:52     ` Peter Stephenson
2016-09-16 22:25       ` Bart Schaefer

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=20160916133302.1f447ca0@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).