On Sun, Nov 01, 2020 at 11:13:37AM +0100, clime wrote: > On Sun, 1 Nov 2020 at 11:01, Oğuz <oguzismailuy...@gmail.com> wrote: > > > > You can use the loadable builtin `setpgid' if you have to. Assuming > > BASH_LOADABLES_BUILTIN is set, this should work: > > > > enable -f setpgid{,} > > { setpgid $BASHPID{,}; a | b; } & > > setpgid $!{,} > > kill -- -$! > > Hello, it doesn't work for me: I've not found any reference about kill -- -$! but try this:
clear;tty=$(tty) tty=${tty#*/dev/};{ { sleep 2; echo a ;} | { wc -c ; sleep 2; echo b ;} } & ps --tty $tty fw; kill -s INT -$! ; ps --tty $tty fw Seem make the job. -- Félix Hauri - <fe...@f-hauri.ch> - http://www.f-hauri.ch