From nobody Mon Mar 28 10:29:10 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 933A71A559EA for ; Mon, 28 Mar 2022 10:29:22 +0000 (UTC) (envelope-from ganael.laplanche@martymac.org) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KRppT3jBXz3jJX; Mon, 28 Mar 2022 10:29:21 +0000 (UTC) (envelope-from ganael.laplanche@martymac.org) Received: (Authenticated sender: ganael.laplanche@martymac.org) by mail.gandi.net (Postfix) with ESMTPSA id 23307240008; Mon, 28 Mar 2022 10:29:13 +0000 (UTC) From: Ganael Laplanche To: Jilles Tjoelker Cc: Bryan Drewery , freebsd-hackers@freebsd.org Subject: Re: Our /bin/sh and process group IDs Date: Mon, 28 Mar 2022 12:29:10 +0200 Message-ID: <5667029.Zv9zXsTiuT@home.martymac.org> In-Reply-To: <20220326193950.GA1667@stack.nl> References: <48e49ad0-a12a-d10b-5867-da9736c6c1fd@martymac.org> <9745f2ef-3aae-5548-c8db-5da7d4ce11e7@martymac.org> <20220326193950.GA1667@stack.nl> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Rspamd-Queue-Id: 4KRppT3jBXz3jJX X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ganael.laplanche@martymac.org designates 217.70.178.230 as permitted sender) smtp.mailfrom=ganael.laplanche@martymac.org X-Spamd-Result: default: False [0.21 / 15.00]; ARC_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[217.70.178.230:from]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:217.70.178.192/26]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[martymac.org]; NEURAL_HAM_LONG(-0.88)[-0.881]; NEURAL_SPAM_MEDIUM(0.62)[0.625]; NEURAL_SPAM_SHORT(0.37)[0.371]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; CTE_CASE(0.50)[]; RCVD_IN_DNSWL_LOW(-0.10)[217.70.178.230:from] X-ThisMailContainsUnwantedMimeParts: N On Saturday, March 26, 2022 8:39:50 PM CEST Jilles Tjoelker wrote: Hello Jilles, > This appears to be a gray area, and the exact behaviour varies across > shells. For example, with stty tostop in effect, > [...] > > I think it is definitely undesirable for set -m to have an effect > across multiple levels of subshells by default, since it makes the > innermost processes immediately escape from the outer process group > supervision again. > > As it is now, FreeBSD sh has implemented this by ignoring set -m from > a process other than the first process Right. Thanks for those interesting examples & explanations. > A second workaround is to start a new instance of sh. Yep ! Thanks again, -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org