bug-bash
[Top][All Lists]
Advanced

[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


From: Chet Ramey
Subject: Re: bash: please provide an easy way to spawn a new process group from script
Date: Sun, 1 Nov 2020 15:23:36 -0500
User-agent: 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    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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