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: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb Date: Wed, 06 Apr 2022 14:33:50 +0200 Message-ID: <87h7765r2p.fsf@gmail.com> References: <87fsmx80e5.fsf@gmail.com> <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> <87bkxk983m.fsf@gmail.com> <87ilrp6iqg.fsf@gmail.com> <87pmlu60vf.fsf@gmail.com> <83o81ecvu7.fsf@gnu.org> <87lewi5sfc.fsf@gmail.com> <83lewicshv.fsf@gnu.org> 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="27480"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 06 14:38: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 1nc4vw-00072o-Hs for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Apr 2022 14:38:48 +0200 Original-Received: from localhost ([::1]:56740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nc4vv-0007AQ-Fm for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Apr 2022 08:38:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc4rI-0004kb-VM for emacs-devel@gnu.org; Wed, 06 Apr 2022 08:34:02 -0400 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:40586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nc4rD-00079x-3x; Wed, 06 Apr 2022 08:33:56 -0400 Original-Received: by mail-wm1-x333.google.com with SMTP id v64-20020a1cac43000000b0038cfd1b3a6dso3527363wme.5; Wed, 06 Apr 2022 05:33:53 -0700 (PDT) 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=57tqM/OtbpYe2XlPzA8+K+5OX9tX1yRjqrX5EPBz6qs=; b=CoagclKCFhjztjJLPxy8cSIgHVOWlkjmsBMKU3CyG/zmfKMVngvPFtN17dUuv61iTC qX+mXlj8usAdkn1hAOY/fAhAl+HUb5IgcOYdV09rBLPqqnVddrXoyBAN7zlxJat5mqOa dLRGo5I+lwj70j34YOBCIhQfkNUr+PNxE3rOsJBcBGxkYA7twWcyjRndRMmiiHutCQjX Cw/ZbrjNojPN4qoWjNSfpZp2mxx6Ed6nTjdW2wfwGDpJ8qO6cl7eXBn2JpF1fkMXtLoh apQ1OG1IyxXrh+3gmzhDHY48EXRQZ4n4h4Uw8DO47euo1h3DYUF+ldjiYexZiNyET+84 Ur0A== 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=57tqM/OtbpYe2XlPzA8+K+5OX9tX1yRjqrX5EPBz6qs=; b=KqtJu7YCIXl3TcSIapKzInmq0Oi4yX9pQx0/bY+sHcVhpn1+Mp9s9zInM3IWvTBLW7 DOOGfMVCB1hDFb3/FGogXRbSKsVJpyCZJbFbNf3EC2VEZY0FIdnA6/ZAEcXGxat4gLmt REkPrfhZO2w9LGpGI4KbEl8LGSLwNAw2DBmZgQkqb55AE0mK1Co9QYoCE3u4oVdm8rQ1 EkjxL7oy+NibBBL7FtFnjouZqvvdvJG+Wt3oOyv7xkZ60SguR1FUhI+yJvvVxqEf3gYk K6OT/lZhJAhswFe3aj4fmHpZ9Ns+tGKiUFDduG4oCdv9vbnWJZk4sgP0jFpBRdyfLo0w XFcg== X-Gm-Message-State: AOAM530tI/5raX2tkUV3aMRjnaEv/ML5x6eu2eTIczvQsv3wAYP7sovo Ez7dZTDdXUhdf7sjwX8KSmJ4+nICxdo= X-Google-Smtp-Source: ABdhPJysEd8HFuouOV/OXfqFFHNJJiPv/fTA7QMuqrIKT/Y8+ONP8iiqeNoo53VAkWHY9KSyJFwc9g== X-Received: by 2002:a05:600c:4f46:b0:38c:d4cd:ee31 with SMTP id m6-20020a05600c4f4600b0038cd4cdee31mr7303767wmq.16.1649248431744; Wed, 06 Apr 2022 05:33:51 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:f97:ff71:7e0d:55c6]) by smtp.gmail.com with ESMTPSA id n22-20020a05600c4f9600b0038c6ec42c38sm5009641wmq.6.2022.04.06.05.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:33:51 -0700 (PDT) In-Reply-To: <83lewicshv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 06 Apr 2022 15:21:16 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=rpluim@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:287838 Archived-At: >>>>> On Wed, 06 Apr 2022 15:21:16 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: emacs-devel@gnu.org >> Date: Wed, 06 Apr 2022 14:04:39 +0200 >>=20 >> >>>>> On Wed, 06 Apr 2022 14:09:04 +0300, Eli Zaretskii said: >>=20 >> >> From: Robert Pluim >> >> Date: Wed, 06 Apr 2022 11:02:12 +0200 >> >>=20 >> >> >>>>> On Mon, 04 Apr 2022 16:11:51 +0200, Robert Pluim said: Robert> In emacs-28 we only use posix_spawn on macOS because its vork is Robert> sub-optimal. I don=CA=BCt remember the rationale for switching = to using it Robert> everywhere, it=CA=BCs undoubtedly in the archives somewhere. >> >>=20 Robert> Closing. Robert> Committed as 8103b060d8 >> >>=20 >> >> Actually, do we want this in emacs-28 as well? >>=20 Eli> The fix installed on master isn't macOS-specific, AFAICT. Can it = be Eli> reasonably installed on emacs-28 as macOS-specific? If yes, I thi= nk Eli> we should indeed backport it. >>=20 >> USABLE_POSIX_SPAWN is 0 on emacs-28 for every platform except macOS, >> so applying the same patch as on master is all that=CA=BCs needed. Eli> I didn't see USABLE_POSIX_SPAWN in the patch. Maybe I was looking= at Eli> the wrong patch. Can you show it? USABLE_POSIX_SPAWN is 0 on emacs-28 for all platforms except macOS, and 1 on master for all platforms (modulo availability of some other required features) =3D> posix_spawn can only be used by macOS on emacs-28. emacs-28 callproc.c: /* In order to be able to use `posix_spawn', it needs to support some variant of `chdir' as well as `setsid'. */ #if defined DARWIN_OS \ && defined HAVE_SPAWN_H && defined HAVE_POSIX_SPAWN \ && defined HAVE_POSIX_SPAWNATTR_SETFLAGS \ && (defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR \ || defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP) \ && defined HAVE_DECL_POSIX_SPAWN_SETSID \ && HAVE_DECL_POSIX_SPAWN_SETSID =3D=3D 1 # include # define USABLE_POSIX_SPAWN 1 #else # define USABLE_POSIX_SPAWN 0 #endif master callproc.c: /* In order to be able to use `posix_spawn', it needs to support some variant of `chdir' as well as `setsid'. */ #if defined HAVE_SPAWN_H && defined HAVE_POSIX_SPAWN \ && defined HAVE_POSIX_SPAWNATTR_SETFLAGS \ && (defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR \ || defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP) \ && defined HAVE_DECL_POSIX_SPAWN_SETSID \ && HAVE_DECL_POSIX_SPAWN_SETSID =3D=3D 1 # include # define USABLE_POSIX_SPAWN 1 #else # define USABLE_POSIX_SPAWN 0 #endif and all uses of posix_spawn are protected by USABLE_POSIX_SPAWN Robert --=20