On Sun, 1 Nov 2020 at 21:23, Chet Ramey <chet.ra...@case.edu> wrote: > > 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.
Job control doesn't seem to be a good solution in scripts when it has side effects like changing the way signals are handled. setpgid syntax looks way too complex and unusable for me anyway right now because i need something which is supported by default. > > 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. That's very much something that I wouldn't want to do for a background pipeline one-liner. Anyway, I don't want to argue about this. If people here don't agree, there is no point in it. Best regards clime > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/