From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] posix_spawn blocks SIGCHLD in spawned processes Date: Fri, 04 Mar 2022 11:07:52 +0100 Message-ID: <87zgm6ghdz.fsf@gmail.com> References: <7CFD5E28-8266-4004-BF66-255146D72722@gnu.org> <83r18whunp.fsf@gnu.org> <36bbd45c-0a87-13b7-1589-afe943329e20@fastmail.com> <83ee4whqpf.fsf@gnu.org> <87v8y33hu1.fsf@rfc20.org> <83sft7aqxd.fsf@gnu.org> <3db6c69c-0c08-3f92-491b-0b715b18eb40@fastmail.com> <87pmo6c3h6.fsf@gmail.com> <86o82mvybj.fsf@hoetzel.info> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16575"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, emacs-devel@gnu.org, Saulius Menkevicius , p.stephani2@gmail.com, Matt Armstrong , Eli Zaretskii , mituharu@math.s.chiba-u.ac.jp To: =?utf-8?Q?J=C3=BCrgen_H=C3=B6tzel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 04 11:08:48 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ4rf-0004Ak-9S for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Mar 2022 11:08:47 +0100 Original-Received: from localhost ([::1]:42818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQ4re-0000oX-24 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Mar 2022 05:08:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ4qs-00007y-VL for emacs-devel@gnu.org; Fri, 04 Mar 2022 05:07:58 -0500 Original-Received: from [2a00:1450:4864:20::331] (port=53089 helo=mail-wm1-x331.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQ4qr-00078P-JR; Fri, 04 Mar 2022 05:07:58 -0500 Original-Received: by mail-wm1-x331.google.com with SMTP id r65so4707722wma.2; Fri, 04 Mar 2022 02:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=nfmP+rZkMzAZipL2w5PzNG/bMbgw8sHhLrAqo77aia4=; b=l7TUHGq1hm7r6Y4BH2TGbyGjgEHtuAZnjUmobhVhVTNgAk9SkCKPKHUBGTb7rT5fiL gDtYZwvPt6CuOdduKgKIHyRVAVbUaGeVAHsz7PmgBKXGUK6apGADXlgIYGo+xewAAe2x 0ZBkUSP94P5SiGc4TT3pioiR7AJ+vf/Eoa9A58BC0ZeXQTnrOIzipWurUj+Cizj751SX /TugUbywB2+aByrGSrDW+rnLDFsVdArdtK/UW0kGtL+52rCLKAI4Mid2QIeHQRP6B+VT vL1Bd838JDDyKD8Qa4d/TGdsUZtiMxol63KYyrddB8+QXS9T1YnDfafuUSDjQSdp3lii Zi2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=nfmP+rZkMzAZipL2w5PzNG/bMbgw8sHhLrAqo77aia4=; b=g4b6kfJMYNmnbWKZLChY3cSL1YCNTYMbiNFc9eTuER3FVjpN+h3ejZa+oCt4gdHvQB H31BXOiN65ShumMezI5rwBdsm4XpExiTgyCLavnQfxEMAx4x3jrVJeY9RPmGBbFUMB+y RQ9/KifGVJTDJl6enifTat3+oNLopvqAQ47Yme2bdxt5461ONMSpJVN/FKfjHf3EmtEr AiLOGouZo3e8xA74RFrpT4JIH0Rsh9IvtvWK8qp5B4VoCviH9eY1mFUxSZ1Kh3QRHofM idyTTHtCdBkGdE0F41SW50qVokMUqBYO9X7YEQmNVjkgSIpxF/h05nyIOLPkrStMVm0P h7Zw== X-Gm-Message-State: AOAM531xc8ImTIJqGD+1ZQpVi+xINBaGEG4qGtb2uC32Eg6urYPuyrXR nHXoehzOvfi0a7C/VBCklthO/s/9F2g= X-Google-Smtp-Source: ABdhPJw8BDeq/pTJfuDPIbJ4V41r1gJzaQWkcaj4PhU1sNlg2j6rGcGSLWxMlxwdxk++l6yxj2S3uQ== X-Received: by 2002:a7b:c042:0:b0:389:7336:158b with SMTP id u2-20020a7bc042000000b003897336158bmr3785070wmc.15.1646388474704; Fri, 04 Mar 2022 02:07:54 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb50:ac53:3a05:3252:e55a]) by smtp.gmail.com with ESMTPSA id m1-20020a5d56c1000000b001f0626c9360sm3125391wrw.44.2022.03.04.02.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 02:07:53 -0800 (PST) In-Reply-To: <86o82mvybj.fsf@hoetzel.info> (=?utf-8?Q?=22J=C3=BCrgen_H?= =?utf-8?Q?=C3=B6tzel=22's?= message of "Fri, 04 Mar 2022 09:38:25 +0100") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::331 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=rpluim@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286813 Archived-At: >>>>> On Fri, 04 Mar 2022 09:38:25 +0100, J=C3=BCrgen H=C3=B6tzel said: J=C3=BCrgen> IMO the correct way to fix this issue is to use the oldset= passed by J=C3=BCrgen> emacs_spawn (patch enclosed) just like the fork/exec imple= mentation does. Sure, that would work as well. J=C3=BCrgen> I guess without a fix many forking commands (that don't ex= amine and J=C3=BCrgen> change mask of blocked signals) will "hang" in Emacs. Not really. It=CA=BCs a code path that=CA=BCs non-default, since process-connection-type defaults to t =3D> use pty's, and the command in question has to care about its children. But it needs to be fixed regardless. I don=CA=BCt have a test case, but the patch looks good to me. Robert --=20