Date: Sat, 26 Mar 2022 15:52:40 +0100 From: Ganael Laplanche <ganael.laplanche@martymac.org> To: Bryan Drewery <bdrewery@FreeBSD.org>, freebsd-hackers@freebsd.org Subject: Re: Our /bin/sh and process group IDs Message-ID: <9745f2ef-3aae-5548-c8db-5da7d4ce11e7@martymac.org> In-Reply-To: <243ebc92-26a1-e5e7-67fe-1477ed6b5f7a@FreeBSD.org> References: <48e49ad0-a12a-d10b-5867-da9736c6c1fd@martymac.org> <243ebc92-26a1-e5e7-67fe-1477ed6b5f7a@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 :) Cheers, -- Ganael LAPLANCHE <ganael.laplanche_at_martymac.org> http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac <martymac_at_FreeBSD.org>, http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9745f2ef-3aae-5548-c8db-5da7d4ce11e7>