From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Newsgroups: gmane.emacs.devel Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible. Date: Tue, 9 Nov 2021 15:46:45 +0100 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Alan Third , YAMAMOTO Mitsuharu , Emacs developers To: Aaron Jensen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 09 15:48:22 2021 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 1mkSQA-000AQL-3J for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Nov 2021 15:48:22 +0100 Original-Received: from localhost ([::1]:45846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkSQ8-0001sT-Vg for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Nov 2021 09:48:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkSOj-0000jI-57 for emacs-devel@gnu.org; Tue, 09 Nov 2021 09:46:55 -0500 Original-Received: from [2a00:1450:4864:20::330] (port=56238 helo=mail-wm1-x330.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkSOh-0003fi-RO for emacs-devel@gnu.org; Tue, 09 Nov 2021 09:46:52 -0500 Original-Received: by mail-wm1-x330.google.com with SMTP id v127so16023547wme.5; Tue, 09 Nov 2021 06:46:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=39LezmAibeGLEkFIMKCstKKKC3f9/RPKMlQ0FbkHVB4=; b=YVj4Ss3PSI/P8QoMvTHivDJ1Lulw2LuetvQaHCO2DtxDP+y3+IJQ58sPkdR2xmkb4g SbXL5RnMOfyWBLsvY0n1/IjpxpPA3/DztVMlPogeTMQ9H7Mndl8NQ497UiIVrbwbZrKN HrFctEuZtrhy5bvQzTWmrehwFApaSi10YrgA/5mqrv8AHvX0VlTmLczMN2xGoJLDSnu0 /jqNxslsREwJZ0zjtfPc/owfp5BX/6D+MGFNEk3lE2mcxqhWJ9z4Li4/X91T8bCstSrg ETXR4lAbKOXlMeP3mSBHqJcOgpAYPFtmFKB7Vz0NyU5LP7xPIYEFl2M/OD/Kdyh4L5tW 2ndw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=39LezmAibeGLEkFIMKCstKKKC3f9/RPKMlQ0FbkHVB4=; b=fOejBNk8FAL6YBBfRTrHG1jtKeU0GgAWR4LnBPVfE8GG5W6znSMAKBoSQZJRGimz57 4zYxDWy+GyscYpYPhAc4LipFDizaFqz79P2UqjYvVwWIVrqAeOVFFFMmtg9QqJb1QdE8 ycH9V06tweXn3ArdWXap0MPRdBvW7BbOU4NdU74JzogrtwbyW8T+MIFfUonk3Xbnp9V3 oSatAWOVpHOlKiCEjpjga0RR/OYQGw3DGyoWXl8tUSQ814resuJ7Z70BEqHBy/0B/W2c YKQRoT1AWDAjCty42xrhrA8EjyuM8hnUX8XDuc8RQljh4SE/Ne/Y8QwtjXUVbFE+vcns HiZg== X-Gm-Message-State: AOAM5336/hngzvZOLV1WXn1FPDWqzFQLNO924mdhHracukw0c50BEYHG AMcofef5PY/lCsnkQfJkyH4= X-Google-Smtp-Source: ABdhPJzZCjbZDsWlUMoI0lxOel245np3ndHOtSVXFW1+wrFcPioriNasPbdFjM8Yw+H5dlrxvB+74Q== X-Received: by 2002:a7b:c752:: with SMTP id w18mr7906702wmk.96.1636469207956; Tue, 09 Nov 2021 06:46:47 -0800 (PST) Original-Received: from smtpclient.apple (p57997199.dip0.t-ipconnect.de. [87.153.113.153]) by smtp.gmail.com with ESMTPSA id u2sm19329616wrr.35.2021.11.09.06.46.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Nov 2021 06:46:47 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::330 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=p.stephani2@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:279107 Archived-At: > Am 08.11.2021 um 12:00 schrieb Aaron Jensen : >=20 > Hi all, >=20 > Attached is the posix spawn patch adapted to be only effective on > Darwin. I chose to leave the patch as-is aside from adding the > additional conditional, but let me know if I should do something > different. It wasn't clear where things stood in terms of whether or > not we would ever want to use posix_spawn on non-darwin OSes. I guess either way is fine. I'd slightly lean towards enabling it = whenever it's available (i.e. remove the condition on DARWIN_OS): 1. The libc implementation of posix_spawn can make use of = system-specific implementation improvements. For example, GNU libc on = GNU/Linux uses the `clone' system call instead of `vfork' to create a = separate stack for the subprocess. 2. Since it's easier to run a continuous integration suite on free OSes, = by exercising the posix_spawn code path on them we can improve test = coverage. 3. Using posix_spawn is simpler since it's not possible to accidentally = introduce undefined behavior (by calling an async-signal-unsafe function = in the child). My original motivation for dropping the posix_spawn branch was that = we'll have to maintain the fork/exec branch for the foreseeable future = and that there's no measurable benefit from using posix_spawn, so it = would just be additional code to maintain. Since that argument is no = longer correct, we might as well use posix_spawn where possible.=