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

Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups



2018-04-12 17:23:42 +0100, Peter Stephenson:
[...]
> So I think this is a definite improvement, though it's probably not safe
> enough to sneak into 5.5.1.
[...]

Thanks, that's definitely an improvement indeed.

There are still a few problems. For instance, it takes 3 ^C to
interrupt:

sleep 10 $(sleep 11) | sleep 12 $(sleep 13) | sleep 14 $(sleep 15) | sleep 16 $(sleep 17)

The first one kills "sleep 11" (running in the shell's process
group), after which "sleep 10" and "sleep 13" start, the second
kills "sleep 10", the 3rd kills "sleep 13" and the command seems
to be aborted (sleep 12 and sleep 14 are not started for some
reason).

^Z still causes an unrecoverable dead-lock (the shell reading
the output of a suspended "sleep 11").

Also note that

echo $(sleep 10) & echo started

Only outputs "started" after 10 seconds.

sleep 10 | echo $((+)) | cat

still starts a pseudo-background job.

-- 
Stephane



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