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

Re: kill the LHS command of a pipe once the RHS command terminates



On Mon, Jul 29, 2019 at 4:15 PM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> zira% (trap '' INT; svn log | { (trap - INT; less;); kill -PIPE 0; })

This is fine, but note that "kill ... 0" sends the signal to the whole
process group, which might have unexpected side-effects.

Bash and ksh93 manage process groups differently than zsh; this is
related to the way zsh runs the right-hand-side of pipelines in the
current shell when it can.

I don't know about dash or mksh, but but they must have more zsh-like
group management.



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