Re: Our /bin/sh and process group IDs

From: Ganael Laplanche <>
Date: Sat, 26 Mar 2022 14:52:40 UTC
Le 25/03/2022 à 20:13, Bryan Drewery a écrit :

Hello Bryan,

> set -m needs to be set from the parent process, not child.

Thanks for those clarifications.

Is that something required by POSIX (I could not find any documentation 
about that) ? Or is it a limitation (or bug) of our implementation ? 
Other shells -mostly- do not behave that way (see my original post).

> In this  example test_func is a child *and* the sleep is a child which is also 
> very racy. Here's a pattern I use that works:
> [...]

Unfortunately, in my case, spawn would have to be called from a 
sub-process already forked (from a background function, executed as a 
child process) ; so that wouldn't work either. Anyway, thanks for the 
hint :)


Ganael LAPLANCHE <> |
FreeBSD: martymac <>,