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

Another bug when suspending pipelines

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.)


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