[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash: please provide an easy way to spawn a new process group from s
Re: bash: please provide an easy way to spawn a new process group from script
Sun, 1 Nov 2020 15:23:36 -0500
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.4.0
On 11/1/20 5:13 AM, clime wrote:
> Work with process groups should be natural in bash. It can't be that
> complex. I struggled with this for several hours and found lots of
> people on the net that struggled with the same problem too.
It is natural, and job control is the most natural way to do it. If you
don't want to use job control for some reason, the `setpgid' loadable
builtin exists, as others have noted.
If you don't want to use the loadable builtin, you can easily write a
standalone program that, when executed, becomes a process group leader
and execs the remaining arguments.
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU email@example.com http://tiswww.cwru.edu/~chet/