bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash: please provide an easy way to spawn a new process group from scrip


From: clime
Subject: bash: please provide an easy way to spawn a new process group from script
Date: Sun, 1 Nov 2020 01:54:29 +0100

I was battling this problem now for several hours

i wanted to do this:

{ a | b; } & pid=$!

and then later

kill -- -$pid

to kill all the processes spawned by the pipeline.

But this proved to be immensely complicated as no new process group is
spawned from within a script (unless set -m which is not recommended
as it blocks signals)

Please, provide a syntactic construct to spawn a new process group (or
at least there should be some usable command to do that).

Thank you
clime



reply via email to

[Prev in Thread] Current Thread [Next in Thread]