From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Mar 2014 22:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 17036@debbugs.gnu.org X-Debbugs-Original-To: bug-emacs Received: via spool by submit@debbugs.gnu.org id=B.13951828701473 (code B ref -1); Tue, 18 Mar 2014 22:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Mar 2014 22:47:50 +0000 Received: from localhost ([127.0.0.1]:40493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ2nV-0000Nh-NP for submit@debbugs.gnu.org; Tue, 18 Mar 2014 18:47:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43722) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ2nT-0000NV-02 for submit@debbugs.gnu.org; Tue, 18 Mar 2014 18:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQ2nR-0005zo-5z for submit@debbugs.gnu.org; Tue, 18 Mar 2014 18:47:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ2nR-0005zk-2x for submit@debbugs.gnu.org; Tue, 18 Mar 2014 18:47:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ2nP-0005CH-Ds for bug-gnu-emacs@gnu.org; Tue, 18 Mar 2014 18:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQ2nO-0005zB-14 for bug-gnu-emacs@gnu.org; Tue, 18 Mar 2014 18:47:43 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ2nE-0005ww-NW for bug-gnu-emacs@gnu.org; Tue, 18 Mar 2014 18:47:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41354) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1WQ2nE-0007A1-6l for bug-emacs@gnu.org; Tue, 18 Mar 2014 18:47:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQ2nC-0005wn-Nn for bug-emacs@gnu.org; Tue, 18 Mar 2014 18:47:32 -0400 Received: from mail-yk0-x232.google.com ([2607:f8b0:4002:c07::232]:36989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ2nC-0005wj-G7 for bug-emacs@gnu.org; Tue, 18 Mar 2014 18:47:30 -0400 Received: by mail-yk0-f178.google.com with SMTP id 79so20933418ykr.9 for ; Tue, 18 Mar 2014 15:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=YoVsPnhkjvgVl/wWK2GxFhCuzzqmJdkZY6xOuLIa+QQ=; b=li2TV3oisA8ieeh2/qETAKXoURBkObJ9USfjgg6E6N9v7ZTe9WU1XjFK2Ovd24tGPl i6XF3UITz61G/3XMvmmKQzXuxIrcN5Kt3D7M6YF12WSl71f0BzoeKvWlMHvWp4Wu07eZ yxJnJavE4g8K+hTCZFki12MBQm/vGVo3CKTMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=YoVsPnhkjvgVl/wWK2GxFhCuzzqmJdkZY6xOuLIa+QQ=; b=EFxQYvdjjJ/fkv5f703vgsShcdzFH7R3YRihiNu3HOKrlvIXzzV4uNNcPLNO9/ceux 0QjBaLCHZXkvECaHRN0rBw4CQT71TG3L5vyIEJU+Wb/CCdffeO3t+/tiEzuyfKTD58rp tsi7VNZ/aFjZbeEjoT91vcVEsersbHApBygQ8NWXWP11wzfbolikQoHUUoqIwcnkwddd 49YUfRScNktYoO8iiVMvxDsADIIJDhMLZdQxPgmGDTEeLy21Axg7okWLRQhJRx/EzWLZ ErfeyxsjjRm7O3wHm8hMcnmVUxUUp1eLAle2y3tpszqIYt5iVNvMEE8lzzNYWLbFGNA7 E/iw== X-Gm-Message-State: ALoCoQmGTPz6khh5brOicHFXC7/xnK0N9Di5MfgGHzqjdUz1WdEiguZAis9Oi23afU6RhWVWKJBp MIME-Version: 1.0 X-Received: by 10.236.23.71 with SMTP id u47mr4687495yhu.143.1395182849782; Tue, 18 Mar 2014 15:47:29 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Tue, 18 Mar 2014 15:47:29 -0700 (PDT) Date: Tue, 18 Mar 2014 22:47:29 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=e89a8f64782d28879c04f4e95212 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --e89a8f64782d28879c04f4e95212 Content-Type: text/plain; charset=ISO-8859-1 Is there a way to give Emacs itself a continuation, i.e. a command to exec when it exits? Copious searching and cursory examination of the source code (grepping for atexit, exit, and looking at emacs.c in some more detail) suggest not. This would be useful for restarting having updated my configuration (some of which is non-idempotent), as it would save having manually to issue a new "emacs" command having waited for it to shut down; overall, up to several brain-seconds if I don't just sit and watch the process. It also seems appropriately Lispy to allow a Lisp system's final action to be to call a continuation... -- http://rrt.sc3d.org --e89a8f64782d28879c04f4e95212 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Is there a way to give Emacs itself a continuati= on, i.e. a command to exec when it exits? Copious searching and cursory exa= mination of the source code (grepping for atexit, exit, and looking at emac= s.c in some more detail) suggest not.

This would be useful for restarting having updated my configurati= on (some of which is non-idempotent), as it would save having manually to i= ssue a new "emacs" command having waited for it to shut down; ove= rall, up to several brain-seconds if I don't just sit and watch the pro= cess.

It also seems appropriately Lispy to allow a Lisp system's fi= nal action to be to call a continuation…
--e89a8f64782d28879c04f4e95212-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Mar 2014 22:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13951831852146 (code B ref 17036); Tue, 18 Mar 2014 22:54:01 +0000 Received: (at 17036) by debbugs.gnu.org; 18 Mar 2014 22:53:05 +0000 Received: from localhost ([127.0.0.1]:40498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ2sa-0000YY-Mw for submit@debbugs.gnu.org; Tue, 18 Mar 2014 18:53:05 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:35311) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ2sY-0000Xw-5z for 17036@debbugs.gnu.org; Tue, 18 Mar 2014 18:53:03 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3fpV5n0h3Kz3hj5L; Tue, 18 Mar 2014 23:53:00 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3fpV5m4XjBzbbg6; Tue, 18 Mar 2014 23:53:00 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 3An8ZoHk5B8V; Tue, 18 Mar 2014 23:53:00 +0100 (CET) X-Auth-Info: FlAIogANcTVU9pJeveroEUUlVrSu5b7jhOB02aSOqTM= Received: from igel.home (ppp-88-217-55-80.dynamic.mnet-online.de [88.217.55.80]) by mail.mnet-online.de (Postfix) with ESMTPA; Tue, 18 Mar 2014 23:53:00 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id C464C2C3734; Tue, 18 Mar 2014 23:52:59 +0100 (CET) From: Andreas Schwab References: X-Yow: Are we on STRIKE yet? Date: Tue, 18 Mar 2014 23:52:59 +0100 In-Reply-To: (Reuben Thomas's message of "Tue, 18 Mar 2014 22:47:29 +0000") Message-ID: <874n2v9l10.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Reuben Thomas writes: > Is there a way to give Emacs itself a continuation, i.e. a command to exec > when it exits? kill-emacs-hook? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Mar 2014 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andreas Schwab Cc: 17036@debbugs.gnu.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13951833992557 (code B ref 17036); Tue, 18 Mar 2014 22:57:01 +0000 Received: (at 17036) by debbugs.gnu.org; 18 Mar 2014 22:56:39 +0000 Received: from localhost ([127.0.0.1]:40503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ2w2-0000fB-IH for submit@debbugs.gnu.org; Tue, 18 Mar 2014 18:56:39 -0400 Received: from mail-yh0-f41.google.com ([209.85.213.41]:51988) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ2vz-0000f1-7R for 17036@debbugs.gnu.org; Tue, 18 Mar 2014 18:56:36 -0400 Received: by mail-yh0-f41.google.com with SMTP id v1so7840363yhn.0 for <17036@debbugs.gnu.org>; Tue, 18 Mar 2014 15:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=v9x/+UxqWldKNpgDSQxzD65x92zRScVI/3EFLajuTjE=; b=YcL8KFPXsv+HEy7wW6vCwVVO93WtBKlUVJXkv1SHfke0VXaX1mGDFtm90WUqzQrQB4 cUfZze499R4T5EqcsbulYgUw59eizDdmVzBsX8gsYkkd3OT9yB37Q+6v9/KaV4O9KVGr UIFC/YHicEbymTmujPxtJz/Z7Esz17JpcTVOg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=v9x/+UxqWldKNpgDSQxzD65x92zRScVI/3EFLajuTjE=; b=kvHgpAVcFFoZNsF/6JmwjiE7Orsf7phGfZZFAb4Muy+nud2U4he0xrV6xQ+7g3gnz+ AmdSof0Nce6JZ2/cWvj4CkJtTEZZjFJctNeMAzO4tM5Xm+eih9Oi+H7X3WDRazrQgEWj BMipyE51FQEkYAEi66Zl6mZQT4/z8HENuDvaYsmtcS+6ohROSUmcUxczPVMeCWgV+zpI SnYIO/saOpUWcdMJFi9u+Nv5dhQ07spIQsLXKa6GpkrIXsoB382j5I1ZGE/oIpeJH/7n DXygac9OHxAFOoeBgNY4J+gMkjcc+8E//J5a7Icf3K0sztkDC93+X43bJ8AdX5A2DAXr ZJEQ== X-Gm-Message-State: ALoCoQm9hQtKeazsIK9TUEykhTmCld2yEkg55V4RR/QnF1aKnKfJC+PTDHQhLVjEOzk3Ml60TGsg MIME-Version: 1.0 X-Received: by 10.236.44.173 with SMTP id n33mr5997587yhb.98.1395183394500; Tue, 18 Mar 2014 15:56:34 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Tue, 18 Mar 2014 15:56:34 -0700 (PDT) In-Reply-To: <874n2v9l10.fsf@igel.home> References: <874n2v9l10.fsf@igel.home> Date: Tue, 18 Mar 2014 22:56:34 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=20cf30063822a04c7104f4e9729d X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf30063822a04c7104f4e9729d Content-Type: text/plain; charset=ISO-8859-1 On 18 March 2014 22:52, Andreas Schwab wrote: > Reuben Thomas writes: > > > Is there a way to give Emacs itself a continuation, i.e. a command to > exec > > when it exits? > > kill-emacs-hook? > That's not a tail-call: to reexec Emacs, it needs to be a proper exec. It might work from kill-emacs-hook, but it's surely not safe? Emacs hasn't finished shutting down when it runs... -- http://rrt.sc3d.org --20cf30063822a04c7104f4e9729d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 1= 8 March 2014 22:52, Andreas Schwab <schwab@linux-m68k.org> wrote:
Reuben Thomas <rrt@sc3d.org> writes:

> Is there a way to give Emacs itself a continuation, i.e. a command to = exec
> when it exits?

kill-emacs-hook?

That's not a tail-= call: to reexec Emacs, it needs to be a proper exec. It might work from kil= l-emacs-hook, but it's surely not safe? Emacs hasn't finished shutt= ing down when it runs…

--
http://rr= t.sc3d.org
--20cf30063822a04c7104f4e9729d-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? In-Reply-To: Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Mar 2014 06:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org, Andreas Schwab Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139521046822015 (code B ref 17036); Wed, 19 Mar 2014 06:28:03 +0000 Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 06:27:48 +0000 Received: from localhost ([127.0.0.1]:40650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ9yc-0005iy-8U for submit@debbugs.gnu.org; Wed, 19 Mar 2014 02:27:47 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35506) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQ9yY-0005ij-Jx for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 02:27:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WQ9yX-0005zN-5J; Wed, 19 Mar 2014 02:27:41 -0400 From: Glenn Morris References: <874n2v9l10.fsf@igel.home> X-Spook: interception Axis of Evil Mafia STARLAN Operation Iraqi X-Ran: <^x:+DqL5*goOty1b:c%]/7>'-N`0g~Ah?/i)GP2A;S X-Hue: blue X-Attribution: GM Date: Wed, 19 Mar 2014 02:27:41 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I could imagine a `restart-emacs' command having some small utility. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Mar 2014 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 17036@debbugs.gnu.org, Andreas Schwab , Reuben Thomas Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139523464512113 (code B ref 17036); Wed, 19 Mar 2014 13:11:02 +0000 Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 13:10:45 +0000 Received: from localhost ([127.0.0.1]:40803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQGGb-00039J-Cj for submit@debbugs.gnu.org; Wed, 19 Mar 2014 09:10:45 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:30822) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQGGY-000397-89 for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 09:10:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al8FABK/CFHO+KKg/2dsb2JhbABEj0SvShdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOOGJZigV6DEw X-IPAS-Result: Al8FABK/CFHO+KKg/2dsb2JhbABEj0SvShdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOOGJZigV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52589967" Received: from 206-248-162-160.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.160]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Mar 2014 09:10:41 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3B0FB60634; Wed, 19 Mar 2014 09:10:41 -0400 (EDT) From: Stefan Message-ID: References: <874n2v9l10.fsf@igel.home> Date: Wed, 19 Mar 2014 09:10:41 -0400 In-Reply-To: (Glenn Morris's message of "Wed, 19 Mar 2014 02:27:41 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I could imagine a `restart-emacs' command having some small utility. Could the w32 build support something like POSIX's `exec'? Stefan From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Mar 2014 13:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Cc: Glenn Morris , 17036@debbugs.gnu.org, Andreas Schwab Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139523517313018 (code B ref 17036); Wed, 19 Mar 2014 13:20:02 +0000 Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 13:19:33 +0000 Received: from localhost ([127.0.0.1]:40809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQGP7-0003Nu-Cs for submit@debbugs.gnu.org; Wed, 19 Mar 2014 09:19:33 -0400 Received: from mail-yk0-f173.google.com ([209.85.160.173]:63700) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQGP3-0003Nj-Ns for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 09:19:31 -0400 Received: by mail-yk0-f173.google.com with SMTP id 10so23132739ykt.4 for <17036@debbugs.gnu.org>; Wed, 19 Mar 2014 06:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rqZj1rntYxNZj63vpIXBY8fTLCljRQ5Lm0h2mZb3f5I=; b=yPvNqLlm+w0+CYLn9TCLdNmHkkI3zKAXzVsRZFT/8W18VRxzEyLePfmHMWHKs7H35g ZZY31mHpAusMwFggU6c4G3HgUwoXbrJ1404Kk95QFroEGnIVmxeiiUnp0JYcb9E5wnnQ rFVvzTEcTgmVNpgu9SnoxAmwk4XCdegbRzySY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=rqZj1rntYxNZj63vpIXBY8fTLCljRQ5Lm0h2mZb3f5I=; b=Xx95hCC8Sk6lBzFXgc1ttwYNb44N/VpnGYhuHWLRFmJPCEfx248/mr9qMap8DZkZ1+ 45uGD9ZjQ6Xqkuj/abm5EY3aIrqYLKLgOTne1PbmSSlIsZdUB+4G+WkARdfZHLE2u0Yn nDNN3frLZnKsTDzYt9nMQRv0K8hxvxg/46XgG5Mz8dZSeCAly7jMexkKgivCoNqg5G5a xfibQjWM6p+e7i5HqCiBxKgOIzWgahZJiBOu8gKZoH2KlsRbsaGk7dtbfOVIMYPtGH6t wKNgseZwwjGqiMocvm3rlfl1msmqVy6A0XDUW9QSTyLlDb/nlp6UISfgt3D8AjVnrMld 23lA== X-Gm-Message-State: ALoCoQnbIf0PS/i1TVG/UuKjuB3F1LKZ2DAGw0iv/B8OASRaGW0tqCWeSj0ymr+U76Rj4Af57v4d MIME-Version: 1.0 X-Received: by 10.236.86.113 with SMTP id v77mr2446363yhe.125.1395235168973; Wed, 19 Mar 2014 06:19:28 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Wed, 19 Mar 2014 06:19:28 -0700 (PDT) In-Reply-To: References: <874n2v9l10.fsf@igel.home> Date: Wed, 19 Mar 2014 13:19:28 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=20cf3011e2a3a00db104f4f58008 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf3011e2a3a00db104f4f58008 Content-Type: text/plain; charset=ISO-8859-1 On 19 March 2014 13:10, Stefan wrote: > > I could imagine a `restart-emacs' command having some small utility. > > Could the w32 build support something like POSIX's `exec'? Windows has execvp... http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx -- http://rrt.sc3d.org --20cf3011e2a3a00db104f4f58008 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 1= 9 March 2014 13:10, Stefan <monnier@iro.umontreal.ca>= wrote:
> I co= uld imagine a `restart-emacs' command having some small utility.

Could the w32 build support something like POSIX's `exec'?


--
http://rrt.sc3d.org<= /a>
--20cf3011e2a3a00db104f4f58008-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Mar 2014 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13952478636096 (code B ref 17036); Wed, 19 Mar 2014 16:52:02 +0000 Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 16:51:03 +0000 Received: from localhost ([127.0.0.1]:41404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQJhl-0001Zy-Ep for submit@debbugs.gnu.org; Wed, 19 Mar 2014 12:51:02 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:45702) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQJhf-0001Zj-Tn for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 12:50:58 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N2O00500ZWKAX00@mtaout28.012.net.il> for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 18:50:50 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2P00OJK04QOG60@mtaout28.012.net.il>; Wed, 19 Mar 2014 18:50:50 +0200 (IST) Date: Wed, 19 Mar 2014 18:51:05 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <8361na9lom.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 19 Mar 2014 13:19:28 +0000 > From: Reuben Thomas > Cc: Andreas Schwab , 17036@debbugs.gnu.org > > On 19 March 2014 13:10, Stefan wrote: > > > > I could imagine a `restart-emacs' command having some small utility. > > > > Could the w32 build support something like POSIX's `exec'? > > > Windows has execvp... http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx Don't believe the sales people. MS's execvp is buggy, and even if we forget about those bugs, it won't do what is expected here: it won't keep the file descriptors open in the original process still open in the overlaid process. That's because there's no 'exec' system call on Windows, so execvp is _emulated_: the original process simply invokes the new one as its child process, and then immediately exits. So the answer to Stefan is: no, this cannot be done on Windows, not without some custom code to let the re-executed Emacs inherit all of the file descriptors which were open in the original Emacs process. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Mar 2014 21:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 17036@debbugs.gnu.org, Andreas Schwab , Stefan Monnier Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13952636702958 (code B ref 17036); Wed, 19 Mar 2014 21:15:02 +0000 Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 21:14:30 +0000 Received: from localhost ([127.0.0.1]:41615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQNoj-0000lc-Eq for submit@debbugs.gnu.org; Wed, 19 Mar 2014 17:14:29 -0400 Received: from mail-yk0-f170.google.com ([209.85.160.170]:38702) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQNoc-0000lQ-Nu for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 17:14:27 -0400 Received: by mail-yk0-f170.google.com with SMTP id 9so24754357ykp.1 for <17036@debbugs.gnu.org>; Wed, 19 Mar 2014 14:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L1vqZT0JFrPJ/BKeROr3XT/QYovqvil466vo9u1Fh00=; b=r5VvCvzxKf750NEK9TD0t8ygOJuyGtN0Cbr+8xys0ywQ0itQCBMw1KPgwG1FlK5HqW UHWxT7mHtohVR2eFRjfKgKDe2CL9D5/cX4cKKXk0P7Iwc20lYOLKvjZetTjGeXmSzALa Fmc6zi6+mHCjIy/KrUBOh2jqSqW9IME01Gk8U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=L1vqZT0JFrPJ/BKeROr3XT/QYovqvil466vo9u1Fh00=; b=LYXXQZRUazA7z/LIHK/ceSZI5SZ/YKuqoEEpSamgOD05V/97a/i6YPaY0QYAUz33Nq XhW385Xd28Y0jRE3GaKMNgjFg9QnHddSpR02im7YoXfzvtpuGkG4dC8V9kOZO8UrWIwW VT8hX7QxJFuvpH7iG13vhcjSKreKk4ZWG+VPbxAwogScuzmCPFVNsVaye3ynrDB5D6xv zCmMHPpJ7v8O0jFhqQE4l2bVk4Wm/4+ipMOy2RwA+3Tm3+f9aw+absO2gPBWR48eyHTW /i3o31cw3DCE6Q8FtYiS7JYP1Dke/R1t0t125f9m65ZMNMY/HH/imOP+NtBDvDwfVh8W iAvw== X-Gm-Message-State: ALoCoQkgKaKoYozbMDKLoRgnof/jyrF5y9Oz67KciH0KpmQ1qA4wNIj5tjW4jDZEhRBqAY+KQZsQ MIME-Version: 1.0 X-Received: by 10.236.206.7 with SMTP id k7mr14973559yho.84.1395263662155; Wed, 19 Mar 2014 14:14:22 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Wed, 19 Mar 2014 14:14:22 -0700 (PDT) In-Reply-To: <8361na9lom.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> Date: Wed, 19 Mar 2014 21:14:22 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=089e01160d0ef3a82604f4fc2295 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e01160d0ef3a82604f4fc2295 Content-Type: text/plain; charset=ISO-8859-1 On 19 March 2014 16:51, Eli Zaretskii wrote: > > Date: Wed, 19 Mar 2014 13:19:28 +0000 > > From: Reuben Thomas > > Cc: Andreas Schwab , 17036@debbugs.gnu.org > > > > On 19 March 2014 13:10, Stefan wrote: > > > > > > I could imagine a `restart-emacs' command having some small utility. > > > > > > Could the w32 build support something like POSIX's `exec'? > > > > > > Windows has execvp... > http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx > > Don't believe the sales people. MS's execvp is buggy, and even if we > forget about those bugs, it won't do what is expected here: it won't > keep the file descriptors open in the original process still open in > the overlaid process. That's because there's no 'exec' system call on > Windows, so execvp is _emulated_: the original process simply invokes > the new one as its child process, and then immediately exits. > That's good enough for restart-emacs. > So the answer to Stefan is: no, this cannot be done on Windows, not > without some custom code to let the re-executed Emacs inherit all of > the file descriptors which were open in the original Emacs process. > It's fine for what i had in mind, namely Emacs simply launching another command with arguments, much as a Lisp callcc. This could be documented as a limitation on Windows. -- http://rrt.sc3d.org --089e01160d0ef3a82604f4fc2295 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 1= 9 March 2014 16:51, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Wed, 19 Mar 2014 13:19:28 +0000
> From: Reuben Thomas <rrt@sc3d.org>
> Cc: Andreas Schwab <
schwab= @linux-m68k.org>, 17036@deb= bugs.gnu.org
>
> On 19 March 2014 13:10, Stefan <monnier@iro.umontreal.ca> wrote:
>
> > > I could imagine a `restart-emacs' command having some sm= all utility.
> >
> > Could the w32 build support something like POSIX's `exec'= ?
>
>
> Windows has execvp... http://msdn.microsoft.com/en-us/l= ibrary/3xw6zy53.aspx

Don't believe the sales people. =A0MS's execvp is buggy, and even i= f we
forget about those bugs, it won't do what is expected here: it won'= t
keep the file descriptors open in the original process still open in
the overlaid process. =A0That's because there's no 'exec' s= ystem call on
Windows, so execvp is _emulated_: the original process simply invokes
the new one as its child process, and then immediately exits.

That's good enough for restart-emacs.
<= div>=A0
So the answer to Stefan is: no, this cannot be done on Windows, not
without some custom code to let the re-executed Emacs inherit all of
the file descriptors which were open in the original Emacs process.

It's fine for w= hat i had in mind, namely Emacs simply launching another command with argum= ents, much as a Lisp callcc. This could be documented as a limitation on Wi= ndows.
--089e01160d0ef3a82604f4fc2295-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Mar 2014 03:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139528711216431 (code B ref 17036); Thu, 20 Mar 2014 03:46:01 +0000 Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 03:45:12 +0000 Received: from localhost ([127.0.0.1]:41769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQTup-0004Gw-7h for submit@debbugs.gnu.org; Wed, 19 Mar 2014 23:45:11 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:51508) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQTum-0004Gj-6n for 17036@debbugs.gnu.org; Wed, 19 Mar 2014 23:45:09 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N2P00900U6JR600@a-mtaout22.012.net.il> for 17036@debbugs.gnu.org; Thu, 20 Mar 2014 05:45:06 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2P009VHUF5RA00@a-mtaout22.012.net.il>; Thu, 20 Mar 2014 05:45:06 +0200 (IST) Date: Thu, 20 Mar 2014 05:45:18 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83r45x8re9.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 19 Mar 2014 21:14:22 +0000 > From: Reuben Thomas > Cc: Stefan Monnier , Andreas Schwab , > 17036@debbugs.gnu.org > > > Don't believe the sales people. MS's execvp is buggy, and even if we > > forget about those bugs, it won't do what is expected here: it won't > > keep the file descriptors open in the original process still open in > > the overlaid process. That's because there's no 'exec' system call on > > Windows, so execvp is _emulated_: the original process simply invokes > > the new one as its child process, and then immediately exits. > > > > That's good enough for restart-emacs. Maybe so, it's hard to say, since you never described what that should do. > > So the answer to Stefan is: no, this cannot be done on Windows, not > > without some custom code to let the re-executed Emacs inherit all of > > the file descriptors which were open in the original Emacs process. > > > > It's fine for what i had in mind, namely Emacs simply launching another > command with arguments, much as a Lisp callcc. This could be documented as > a limitation on Windows. I very much doubt that this limitation would not render the whole issue moot on Windows. E.g., how will restart-emacs then be different from a simple call-process? But again, since you didn't say what the feature is supposed to do, ... From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Mar 2014 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 17036@debbugs.gnu.org, Andreas Schwab , Stefan Monnier Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13953169759398 (code B ref 17036); Thu, 20 Mar 2014 12:03:01 +0000 Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 12:02:55 +0000 Received: from localhost ([127.0.0.1]:41924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQbgU-0002RV-3I for submit@debbugs.gnu.org; Thu, 20 Mar 2014 08:02:54 -0400 Received: from mail-yh0-f53.google.com ([209.85.213.53]:58073) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQbgQ-0002RI-Je for 17036@debbugs.gnu.org; Thu, 20 Mar 2014 08:02:52 -0400 Received: by mail-yh0-f53.google.com with SMTP id v1so637808yhn.26 for <17036@debbugs.gnu.org>; Thu, 20 Mar 2014 05:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1dnR/rUEkfw5DmTAHYvx6XPJNkGNxFULfHqF4FvGAfc=; b=LhRWRCQGbEuAXI9XZrLaX8MvT8GJPuNIFhpbNeAJMYFibwEBx4hIR2xlu1s/XWe+0T ZpuqmpCq2TJl7O036y8jXgjXfqvKRq6laGfCulbYymXquFgZ1c3kb+T3UoU8aqj5rZ+S X9PZsjhAqCiypphB8Ub3td4kQAZuxZ3e3AeIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1dnR/rUEkfw5DmTAHYvx6XPJNkGNxFULfHqF4FvGAfc=; b=azqLTP6fkaPnjGWY7857Yv7nWGGKKwG2ADAqk4rBwWAhTYextTGJlnTbyiManbq1Gi PHxTYXOMck+XFkhnI0hifvgdcyMsC/LwMP0tULXbpZnGejtk84nNBg45qVr9Leu9Yd92 UDAmCmVlqaM1XoZjeH7L8dS5VHaX7yKFfdApb4gVVjuYYNVnGd1MtIsGIRMJOoHmAR25 yk5Y6SLIND12DL3A0ZSGIm8IHA2hnyDIN6f6pNmAZB3WTvGTSCHNdEinsyePC6CoYlUV BhXasIdkGfDGJ85dmKlBAeAymm1A3k7txq61R7XqqLBr8IIktVtLECMAYA71Ot9b6/YA A7dg== X-Gm-Message-State: ALoCoQknuD0pwdNxz7hKH3JAI1xqauoo/9tsnEXghKCZXFZNZWGQdQKzuTAMdkCyDoZI1GlHDVZh MIME-Version: 1.0 X-Received: by 10.236.122.99 with SMTP id s63mr34468581yhh.19.1395316969633; Thu, 20 Mar 2014 05:02:49 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Thu, 20 Mar 2014 05:02:49 -0700 (PDT) In-Reply-To: <83r45x8re9.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> Date: Thu, 20 Mar 2014 12:02:49 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=20cf301af33553288204f5088c3a X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf301af33553288204f5088c3a Content-Type: text/plain; charset=ISO-8859-1 On 20 March 2014 03:45, Eli Zaretskii wrote: > > Date: Wed, 19 Mar 2014 21:14:22 +0000 > > From: Reuben Thomas > > Cc: Stefan Monnier , Andreas Schwab < > schwab@linux-m68k.org>, > > 17036@debbugs.gnu.org > > > > > Don't believe the sales people. MS's execvp is buggy, and even if we > > > forget about those bugs, it won't do what is expected here: it won't > > > keep the file descriptors open in the original process still open in > > > the overlaid process. That's because there's no 'exec' system call on > > > Windows, so execvp is _emulated_: the original process simply invokes > > > the new one as its child process, and then immediately exits. > > > > > > > That's good enough for restart-emacs. > > Maybe so, it's hard to say, since you never described what that should > do. > I didn't discuss the command (it was Glenn Morris who suggested the name), but in my original bug report I said: "This would be useful for restarting having updated my configuration...as it would save having manually to issue a new 'emacs' command..." For this, a simple "exec emacs" is enough, but why not throw in command-line arguments too. > I very much doubt that this limitation would not render the whole > issue moot on Windows. E.g., how will restart-emacs then be different > from a simple call-process? Because Emacs does not continue running after it exits. As I said in my second email to this bug: "...to reexec Emacs, it needs to be a proper exec [so that] Emacs has[...] finished shutting down when it runs." If you simply use CallProcess (or fork/exec on POSIX systems), then the newly-started emacs will be in contention with the old one, even if the old one has nearly finished exiting. > But again, since you didn't say what the > feature is supposed to do, ... > A tail-call, but for processes. (BTW, sorry to have mentioned call/cc earlier, that was a bad analogy.) -- http://rrt.sc3d.org --20cf301af33553288204f5088c3a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 0 March 2014 03:45, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Wed, 19 Mar 2014 21:14:22 +0000
> From: Reuben Thomas <rrt@sc3d.org>
> Cc: Stefan Monnier <
mon= nier@iro.umontreal.ca>, Andreas Schwab <schwab@linux-m68k.org>,
>       17036@de= bbugs.gnu.org
>
> > Don't believe the sales people.  MS'= s execvp is buggy, and even if we
> > forget about those bugs, it won't do what is expected here: i= t won't
> > keep the file descriptors open in the original process still open= in
> > the overlaid process.  That's because there's no = 9;exec' system call on
> > Windows, so execvp is _emulated_: the original process simply inv= okes
> > the new one as its child process, and then immediately exits.
> >
>
> That's good enough for restart-emacs.

Maybe so, it's hard to say, since you never described what that s= hould
do.

I didn't discuss the command (i= t was Glenn Morris who suggested the name), but in my original bug report I= said: "This would be useful for restarting having updated my configur= ation…as it would save having manually to=20 issue a new 'emacs' command…" F= or this, a simple "exec emacs" is enough, but why not throw in co= mmand-line arguments too.
 
I very much doubt that this limitation would not render the whole
issue moot on Windows.  E.g., how will restart-emacs then be different=
from a simple call-process?

Because Emacs d= oes not continue running after it exits. As I said in my second email to th= is bug: "…to reexec Emacs, it needs to be a proper exec [so tha= t] Emacs=20 has[…] finished shutting down when it runs."

= If you simply use CallProcess (or fork/exec on POSIX systems), then the new= ly-started emacs will be in contention with the old one, even if the old on= e has nearly finished exiting.
 
&= nbsp;But again, since you didn't say what the
feature is supposed to do, ...

A tail-call, but fo= r processes. (BTW, sorry to have mentioned call/cc earlier, that was a bad = analogy.)
--20cf301af33553288204f5088c3a-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Mar 2014 17:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139533740327642 (code B ref 17036); Thu, 20 Mar 2014 17:44:02 +0000 Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 17:43:23 +0000 Received: from localhost ([127.0.0.1]:42607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQgzy-0007Bm-EC for submit@debbugs.gnu.org; Thu, 20 Mar 2014 13:43:22 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:55214) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQgzv-0007Bd-IX for 17036@debbugs.gnu.org; Thu, 20 Mar 2014 13:43:20 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N2Q00C00X3PAP00@a-mtaout20.012.net.il> for 17036@debbugs.gnu.org; Thu, 20 Mar 2014 19:43:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2Q00CVPX852850@a-mtaout20.012.net.il>; Thu, 20 Mar 2014 19:43:18 +0200 (IST) Date: Thu, 20 Mar 2014 19:43:31 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83txas7ol8.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 20 Mar 2014 12:02:49 +0000 > From: Reuben Thomas > Cc: Stefan Monnier , Andreas Schwab , > 17036@debbugs.gnu.org > > I didn't discuss the command (it was Glenn Morris who suggested the name), > but in my original bug report I said: "This would be useful for restarting > having updated my configuration...as it would save having manually to issue a > new 'emacs' command..." For this, a simple "exec emacs" is enough, but why > not throw in command-line arguments too. I'm probably missing something, because I don't see how "exec emacs" will do what you want. See below. > > I very much doubt that this limitation would not render the whole > > issue moot on Windows. E.g., how will restart-emacs then be different > > from a simple call-process? > > Because Emacs does not continue running after it exits. As I said in my > second email to this bug: "...to reexec Emacs, it needs to be a proper exec > [so that] Emacs has[...] finished shutting down when it runs." > > If you simply use CallProcess (or fork/exec on POSIX systems), then the > newly-started emacs will be in contention with the old one, even if the old > one has nearly finished exiting. What do you mean by "in contention"? What contention do you envision? > A tail-call, but for processes. But AFAIU, 'exec' is not a tail-call. It doesn't shut down the invoking process; in particular, the atexit and on_exit handlers are not run. Depending on where you invoke it in Emacs, even the kill-emacs-hook might not run. Therefore, you cannot control whether everything you get in an orderly shutdown, which you will then need for the restart, will be in order. There are also all kinds of small details, like the lock files left behind by the original process -- the PID remains the same after 'exec', AFAIK. Etc. IOW, I'm not entirely sure 'exec' will do what you want. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Mar 2014 23:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 17036@debbugs.gnu.org, Andreas Schwab , Stefan Monnier Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139535702632364 (code B ref 17036); Thu, 20 Mar 2014 23:11:01 +0000 Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 23:10:26 +0000 Received: from localhost ([127.0.0.1]:42746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQm6T-0008Pw-QY for submit@debbugs.gnu.org; Thu, 20 Mar 2014 19:10:26 -0400 Received: from mail-yk0-f171.google.com ([209.85.160.171]:53530) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQm6N-0008Pj-LZ for 17036@debbugs.gnu.org; Thu, 20 Mar 2014 19:10:24 -0400 Received: by mail-yk0-f171.google.com with SMTP id q9so4217386ykb.2 for <17036@debbugs.gnu.org>; Thu, 20 Mar 2014 16:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z5xhckPBwVcc0JtYPMiS/f5CO2CTDyD0tADktCCNIPM=; b=srvXGaS4invMeWVwtyAguf5qjuGXakCz6Y4gc+cSpP3psL/lHK+7iFvJhBSYtUFTEs zSZ7qcabaVtGaYlHrkdcu5fUen2qDFIwg0u1S0HZ3kkSyYSk2Oa1i/vHZcpOxalAhtCu +ya9oGpqxLTJxErNyp+tlPLXzP0Aqo7oN2TVc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z5xhckPBwVcc0JtYPMiS/f5CO2CTDyD0tADktCCNIPM=; b=JOPx2k0Nkif8H4UN5ZKfEb2IYT9vQrLaOPc0+EQkywo4p40dPL3VVyDXUvzODbRt1f cbi3ZJjmal4o6BLEOSKVNwE6l7BRFhY7tQaXaxDqOBPaPXb2/R61sFtxBFd8o54fBeq3 prBjRB9DB8gQd6BhfBOftPpSpCgTthEAjpwxViY41i8ctwOQh9bjq+S5QtQkPXjmwVnB Pa2iq6aVHQpcqCd0wTpAL9hgeiH3aXYmaKEUksw58p+sWceThEbs1rlX5M0BOU3ppSDO XjVosCxybPPfrJaqwa6yTprBwWieSaO8e/W/aL2zUBrSQJ9GDQWnAwZK0W3PxBVCwXWr AuPQ== X-Gm-Message-State: ALoCoQnxFuugACmdkNXdeDgz36k6KumJgakxbBT4Hc0VEaRTZegPPmU5WWPxY6Z920/d+BV3drvb MIME-Version: 1.0 X-Received: by 10.236.88.193 with SMTP id a41mr36721068yhf.22.1395357019165; Thu, 20 Mar 2014 16:10:19 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Thu, 20 Mar 2014 16:10:19 -0700 (PDT) In-Reply-To: <83txas7ol8.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> Date: Thu, 20 Mar 2014 23:10:19 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=20cf3010ebfd7676fd04f511df40 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf3010ebfd7676fd04f511df40 Content-Type: text/plain; charset=ISO-8859-1 On 20 March 2014 17:43, Eli Zaretskii wrote: > > Date: Thu, 20 Mar 2014 12:02:49 +0000 > > From: Reuben Thomas > > Cc: Stefan Monnier , Andreas Schwab < > schwab@linux-m68k.org>, > > 17036@debbugs.gnu.org > > > > I didn't discuss the command (it was Glenn Morris who suggested the > name), > > but in my original bug report I said: "This would be useful for > restarting > > having updated my configuration...as it would save having manually to > issue a > > new 'emacs' command..." For this, a simple "exec emacs" is enough, but > why > > not throw in command-line arguments too. > > I'm probably missing something, because I don't see how "exec emacs" > will do what you want. I'm sorry, I seem to have made a total hash of explaining something really simple. In effect, I want kill-emacs-and-exec, which takes a list of arguments, runs kill-emacs, and then execs the argument list. In fact, since kill-emacs can't currently take a list, it could be extended to do so. save-buffers-kill-emacs could be likewise extended. Does that make sense now? --20cf3010ebfd7676fd04f511df40 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 0 March 2014 17:43, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Thu, 20 Mar 2014 12:02:49 +0000
> From: Reuben Thomas <rrt@sc3d.org>
> Cc: Stefan Monnier <mon= nier@iro.umontreal.ca>, Andreas Schwab <schwab@linux-m68k.org>,
> =A0 =A0 =A0 17036@debbugs.gnu= .org
>
> I didn't discuss the command (it was Glenn M= orris who suggested the name),
> but in my original bug report I said: "This would be useful for r= estarting
> having updated my configuration...as it would save having manual= ly to issue a
> new 'emacs' command..." For this, a simple "exec ema= cs" is enough, but why
> not throw in command-line arguments too.

I'm probably missing something, because I don't see how "= ;exec emacs"
will do what you want.

I'm sorry, I see= m to have made a total hash of explaining something really simple. In effec= t, I want kill-emacs-and-exec, which takes a list of arguments, runs kill-e= macs, and then execs the argument list.

In fact, since kill-emacs can't currently take a list, i= t could be extended to do so.

save-buffers-kill-emacs cou= ld be likewise extended.

Does that make sense now?
--20cf3010ebfd7676fd04f511df40-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 07:54:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.139538840424557 (code B ref 17036); Fri, 21 Mar 2014 07:54:03 +0000 Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 07:53:24 +0000 Received: from localhost ([127.0.0.1]:42882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQuGZ-0006O0-RD for submit@debbugs.gnu.org; Fri, 21 Mar 2014 03:53:24 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:50278) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQuGW-0006Nh-FB for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 03:53:21 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N2S00K00044YG00@a-mtaout21.012.net.il> for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 09:53:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2S00KNM0KUZ100@a-mtaout21.012.net.il>; Fri, 21 Mar 2014 09:53:18 +0200 (IST) Date: Fri, 21 Mar 2014 09:53:33 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <8361n86l8i.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 20 Mar 2014 23:10:19 +0000 > From: Reuben Thomas > Cc: Stefan Monnier , Andreas Schwab , > 17036@debbugs.gnu.org > > I'm sorry, I seem to have made a total hash of explaining something really > simple. In effect, I want kill-emacs-and-exec, which takes a list of > arguments, runs kill-emacs, and then execs the argument list. As long as it does what you want, fine. But please note that this is not the same as exiting Emacs and starting a new session, because the original Emacs didn't shut down all the way, and the PID is the same. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 10:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 17036@debbugs.gnu.org, Andreas Schwab , Stefan Monnier Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13953965557032 (code B ref 17036); Fri, 21 Mar 2014 10:10:01 +0000 Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:09:15 +0000 Received: from localhost ([127.0.0.1]:42963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQwO2-0001pM-Eq for submit@debbugs.gnu.org; Fri, 21 Mar 2014 06:09:14 -0400 Received: from mail-yh0-f44.google.com ([209.85.213.44]:44319) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQwNz-0001p4-Ir for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 06:09:12 -0400 Received: by mail-yh0-f44.google.com with SMTP id f10so2075826yha.17 for <17036@debbugs.gnu.org>; Fri, 21 Mar 2014 03:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Vwu1n3Aq7IuOQyJUT7Y7P65grQEDgCuFH+W0XiPdH84=; b=Bh2YzftQ2xhbQsLcpJ7J7gM8csdEvux9YSPVL77E7ifgzXMvv7ynXtP7f4Z8s4i5rx DchAHPc8J3hl4YqKSHBcqWvUDzlpexmSChX06dnNWkAD1cAATfs7Lu6cVLAUSqVI2dmy n/TNfr5khVs7D3rYLFaZtWk544gmWt1/rgSeQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Vwu1n3Aq7IuOQyJUT7Y7P65grQEDgCuFH+W0XiPdH84=; b=LoT+uWEBpg3R4bQqge9psv1M0vRKRHS1YGdnCN8eZwn4SKBWeJFdM97qbPAStIlrbl Aighlz2VBgXn5o/3Of0fUc59d3iU6dvSJRz9sUV48/rntzFtQUBhE5NcvFulDi0e/t76 7L5cvA/oZ+OIsaOkoJGeNB8w0qS6RGtqs3/EhhLaHT+Tj/IemP6+QANOLT47jcsnR/Sf vlkz86yOhW9gl3QOTOj7g9wwPmuO/a3U/7rOsMw/xCjIQSz/K5oT3L0zfMhjYRWAw/aM PXENYvy40vAh+SEOakrcqgXEG45sgeNQxOOP2ezXORocZooxNuUFAyuHgy7c+R9AMYqW NxUQ== X-Gm-Message-State: ALoCoQmj6TviW2HTSDSl+LyMV0WelGWiUenjDnyqCvZSbRVJ0yjhvcuFMK6RaIHpeGIbrN5fv8GT MIME-Version: 1.0 X-Received: by 10.236.87.174 with SMTP id y34mr688918yhe.141.1395396550969; Fri, 21 Mar 2014 03:09:10 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Fri, 21 Mar 2014 03:09:10 -0700 (PDT) In-Reply-To: <8361n86l8i.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> <8361n86l8i.fsf@gnu.org> Date: Fri, 21 Mar 2014 10:09:10 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=20cf3011dc83bdfdf504f51b1364 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf3011dc83bdfdf504f51b1364 Content-Type: text/plain; charset=ISO-8859-1 On 21 March 2014 07:53, Eli Zaretskii wrote: > > Date: Thu, 20 Mar 2014 23:10:19 +0000 > > From: Reuben Thomas > > Cc: Stefan Monnier , Andreas Schwab < > schwab@linux-m68k.org>, > > 17036@debbugs.gnu.org > > > > I'm sorry, I seem to have made a total hash of explaining something > really > > simple. In effect, I want kill-emacs-and-exec, which takes a list of > > arguments, runs kill-emacs, and then execs the argument list. > > As long as it does what you want, fine. But please note that this is > not the same as exiting Emacs and starting a new session, because the > original Emacs didn't shut down all the way, and the PID is the same. > I think I'm still being unclear, sorry. I am assuming that all the regular atexit handlers have already been called, and that Emacs is really about to exit. (That is what I mean by saying that kill-emacs has been run.) So, this could be implemented by ensuring that the first atexit handler to be registered on startup checks a "kill-emacs-and-exec" flag, and if it is set, does the exec. Correspondingly, kill-emacs-and-exec would set the flag, store the arguments in a suitable place, and then tail-call to kill-emacs. -- http://rrt.sc3d.org --20cf3011dc83bdfdf504f51b1364 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 1 March 2014 07:53, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Thu, 20 Mar 2014 23:10:19 +0000
> From: Reuben Thomas <rrt@sc3d.org>
> Cc: Stefan Monnier <mon= nier@iro.umontreal.ca>, Andreas Schwab <schwab@linux-m68k.org>,
> =A0 =A0 =A0 17036@debbugs.gnu= .org
>
> I'm sorry, I seem to have made a total hash = of explaining something really
> simple. In effect, I want kill-emacs-and-exec, which takes a list of > arguments, runs kill-emacs, and then execs the argument list.

As long as it does what you want, fine. =A0But please note that this = is
not the same as exiting Emacs and starting a new session, because the
original Emacs didn't shut down all the way, and the PID is the same.

I think I'm sti= ll being unclear, sorry.

I am assum= ing that all the regular atexit handlers have already been called, and that= Emacs is really about to exit. (That is what I mean by saying that kill-em= acs has been run.) So, this could be implemented by ensuring that the first= atexit handler to be registered on startup checks a "kill-emacs-and-e= xec" flag, and if it is set, does the exec. Correspondingly, kill-emac= s-and-exec would set the flag, store the arguments in a suitable place, and= then tail-call to kill-emacs.
--20cf3011dc83bdfdf504f51b1364-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Reuben Thomas Cc: 17036@debbugs.gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13953971048089 (code B ref 17036); Fri, 21 Mar 2014 10:19:02 +0000 Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:18:24 +0000 Received: from localhost ([127.0.0.1]:42967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQwWt-00026M-Lm for submit@debbugs.gnu.org; Fri, 21 Mar 2014 06:18:24 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:44969) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQwWq-000264-Hw for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 06:18:22 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N2S00L0073M1M00@a-mtaout20.012.net.il> for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 12:18:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2S00KZE7AIQ180@a-mtaout20.012.net.il>; Fri, 21 Mar 2014 12:18:18 +0200 (IST) Date: Fri, 21 Mar 2014 12:18:34 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83lhw36eit.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> <8361n86l8i.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 21 Mar 2014 10:09:10 +0000 > From: Reuben Thomas > Cc: Stefan Monnier , Andreas Schwab , > 17036@debbugs.gnu.org > > > As long as it does what you want, fine. But please note that this is > > not the same as exiting Emacs and starting a new session, because the > > original Emacs didn't shut down all the way, and the PID is the same. > > > > I think I'm still being unclear, sorry. > > I am assuming that all the regular atexit handlers have already been > called, and that Emacs is really about to exit. (That is what I mean by > saying that kill-emacs has been run.) So, this could be implemented by > ensuring that the first atexit handler to be registered on startup checks a > "kill-emacs-and-exec" flag, and if it is set, does the exec. Assuming a call to 'exec' is allowed in an atexit handler. (I don't know if it is.) From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 17036@debbugs.gnu.org, Andreas Schwab , Stefan Monnier Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13953971138112 (code B ref 17036); Fri, 21 Mar 2014 10:19:02 +0000 Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:18:33 +0000 Received: from localhost ([127.0.0.1]:42970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQwX2-00026m-M7 for submit@debbugs.gnu.org; Fri, 21 Mar 2014 06:18:33 -0400 Received: from mail-yh0-f45.google.com ([209.85.213.45]:39084) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQwX0-00026e-MW for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 06:18:31 -0400 Received: by mail-yh0-f45.google.com with SMTP id a41so2091884yho.18 for <17036@debbugs.gnu.org>; Fri, 21 Mar 2014 03:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NCeawH1p72D0MEwa5UffldzfiiKHmPpBEowdlNxu7bE=; b=lLeUQCE8uX8Czm88t1knuj8qh+it7Wic7JbRkyJazGcq0xSxl0UXYV5gioXHDZVZQ6 NqNoo93b3VfCdltoIH3nKT7T1ugw5zaoem7Q9GB/gBrayjdxhFcPqNHTpdxux6BnypvF 4WHqt++4jpbK6YJIuvQQOwml+VeIVpNPS17cg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NCeawH1p72D0MEwa5UffldzfiiKHmPpBEowdlNxu7bE=; b=S4DU0ee00MQ7mbHViDoA8FaKsLoj94a4/WAjdAKe5ppPzTIiKnD3aJlVjQQNJhHDJi PoNiZQJmUhtb1DfI60f6kFUVQJhIKNFj6AufBFB5sRWvJLPIA4eK7hKkFzn/zpYSjfN/ vguGUncWaytGE/wuSJF1kNneApIsz5f6svntzxiosCkKnLlPvyo55F2vIcV0TCGnp4Vk H9i7tgEMwWKnNpqXAh00NZ4cCxQbq2ghaX7sohl/PBeVwPAbyOWAS04Cdc62uIF4lOPf ILCbtIffAXxJxzcdjWGbPmFEsMjrykyl58EuSVnQQkU2NqJSXQwQgf76nAXJ4FLJWgNV tmsg== X-Gm-Message-State: ALoCoQlUGQEAnN8KnAAPbw7K6rt2+///sOFK4sXyULsyezT9eshQmxtP1fRT+/kp6MkPO7rfE7Mv MIME-Version: 1.0 X-Received: by 10.236.32.103 with SMTP id n67mr7276290yha.73.1395397110222; Fri, 21 Mar 2014 03:18:30 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Fri, 21 Mar 2014 03:18:30 -0700 (PDT) In-Reply-To: References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> <8361n86l8i.fsf@gnu.org> Date: Fri, 21 Mar 2014 10:18:30 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=001a11c1f53c13639504f51b350f X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c1f53c13639504f51b350f Content-Type: text/plain; charset=ISO-8859-1 On 21 March 2014 10:09, Reuben Thomas wrote: > > On 21 March 2014 07:53, Eli Zaretskii wrote: > >> > Date: Thu, 20 Mar 2014 23:10:19 +0000 >> > From: Reuben Thomas >> > Cc: Stefan Monnier , Andreas Schwab < >> schwab@linux-m68k.org>, >> > 17036@debbugs.gnu.org >> > >> > I'm sorry, I seem to have made a total hash of explaining something >> really >> > simple. In effect, I want kill-emacs-and-exec, which takes a list of >> > arguments, runs kill-emacs, and then execs the argument list. >> >> As long as it does what you want, fine. But please note that this is >> not the same as exiting Emacs and starting a new session, because the >> original Emacs didn't shut down all the way, and the PID is the same. >> > > I think I'm still being unclear, sorry. > > I am assuming that all the regular atexit handlers have already been > called, and that Emacs is really about to exit. (That is what I mean by > saying that kill-emacs has been run.) So, this could be implemented by > ensuring that the first atexit handler to be registered on startup checks a > "kill-emacs-and-exec" flag, and if it is set, does the exec. > Correspondingly, kill-emacs-and-exec would set the flag, store the > arguments in a suitable place, and then tail-call to kill-emacs. > And if there is a problem with keeping the same PID, or with file descriptors still being open, or any other kind of resource that is released on process exit, then by all means have the atexit handler mentioned above fork(). -- http://rrt.sc3d.org --001a11c1f53c13639504f51b350f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 1 March 2014 10:09, Reuben Thomas <rrt@sc3d.org> wrote:

On 21 March 2014 07:53, Eli Zaretskii <eliz@gnu.org&= gt; wrote:
> Date: Thu, 20 Mar 2014 23:10:19 +0000
> From: Reuben Thomas <rrt@sc3d.org>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Andreas Schwab <schwab@linux-m68k.org>,
> =A0 =A0 =A0
17036@debbugs.gnu.org
>
> I'm sorry, I seem to have made a total hash of explaini= ng something really
> simple. In effect, I want kill-emacs-and-exec, which takes a list of > arguments, runs kill-emacs, and then execs the argument list.

As long as it does what you want, fine. =A0But please note that this = is
not the same as exiting Emacs and starting a new session, because the
original Emacs didn't shut down all the way, and the PID is the same.

I think= I'm still being unclear, sorry.

I am assuming that all the regular atexit handlers have already been call= ed, and that Emacs is really about to exit. (That is what I mean by saying = that kill-emacs has been run.) So, this could be implemented by ensuring th= at the first atexit handler to be registered on startup checks a "kill= -emacs-and-exec" flag, and if it is set, does the exec. Correspondingl= y, kill-emacs-and-exec would set the flag, store the arguments in a suitabl= e place, and then tail-call to kill-emacs.

And if there is = a problem with keeping the same PID, or with file descriptors still being o= pen, or any other kind of resource that is released on process exit, then b= y all means have the atexit handler mentioned above fork().

--
http://rrt.sc3d.org<= /a>
--001a11c1f53c13639504f51b350f-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 10:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 17036@debbugs.gnu.org, Andreas Schwab , Stefan Monnier Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13953975639198 (code B ref 17036); Fri, 21 Mar 2014 10:27:01 +0000 Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:26:03 +0000 Received: from localhost ([127.0.0.1]:42986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQweG-0002Nx-4b for submit@debbugs.gnu.org; Fri, 21 Mar 2014 06:26:01 -0400 Received: from mail-yh0-f51.google.com ([209.85.213.51]:35712) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQweA-0002NS-Vu for 17036@debbugs.gnu.org; Fri, 21 Mar 2014 06:25:55 -0400 Received: by mail-yh0-f51.google.com with SMTP id f10so2082554yha.24 for <17036@debbugs.gnu.org>; Fri, 21 Mar 2014 03:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bLd2t8L375lh8a8/JgMd/YlrDW8/wysYQgDIjIUzyRw=; b=oJdMEVvR96xnQsbpOpM38A0iOMyvF6Tn2g3uayKKh+PBRYRb2fczBYkp+NfiYxuDpN NTQ+CZyXsbmnT3DdkHRARFFomQy86wAGozpzsP1yRDSxvRhrd6nRthPnA/TtyZWzGJ7h k6ic0GDyBhiI9rCmEaef+J27xERtVu7Q7YRqU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bLd2t8L375lh8a8/JgMd/YlrDW8/wysYQgDIjIUzyRw=; b=W21u/sdr91qnn0oinMW+2dgSKSkm+q1JNmUbL1eaVMyxejZePVts/tx88MBC1cMLFW z/1woauzb0EEbHvmLzkXxnq+hZ4qIkmkSqrmggAMdYQu13HvanN1IB4nHtCSfBxNbK4Q Qm+TOiEpqHGxm8k+bcRHuUp8K3+xw9jdyjfxwEwlhtOdhpLOZpjG63wul3NbCB7aQHsi 5WECHXNlrJM22FWuIO2r5Da4bKtLEu4M19jvnVRAw6oMDqh03JKdYjXuNqkdU6zx6htT O3+E51mPAvlXilY6XXuCbc1Aoxigf96SDaiVXeRUbX2noEOxQnYtc5s47vx4SsjVgCSM k4yw== X-Gm-Message-State: ALoCoQmVOokLcQiR8aKxVH5c0wB+UADuxnc3HwYe+6dlwWnArp3Dm17SMLUaKVr4qB9hDYwIEDQr MIME-Version: 1.0 X-Received: by 10.236.94.103 with SMTP id m67mr41450108yhf.7.1395397554498; Fri, 21 Mar 2014 03:25:54 -0700 (PDT) Received: by 10.170.137.66 with HTTP; Fri, 21 Mar 2014 03:25:54 -0700 (PDT) In-Reply-To: <83lhw36eit.fsf@gnu.org> References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> <8361n86l8i.fsf@gnu.org> <83lhw36eit.fsf@gnu.org> Date: Fri, 21 Mar 2014 10:25:54 +0000 Message-ID: From: Reuben Thomas Content-Type: multipart/alternative; boundary=20cf3010e8638e7e6504f51b4fd6 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf3010e8638e7e6504f51b4fd6 Content-Type: text/plain; charset=ISO-8859-1 On 21 March 2014 10:18, Eli Zaretskii wrote: > > Date: Fri, 21 Mar 2014 10:09:10 +0000 > > From: Reuben Thomas > > Cc: Stefan Monnier , Andreas Schwab < > schwab@linux-m68k.org>, > > 17036@debbugs.gnu.org > > > > > As long as it does what you want, fine. But please note that this is > > > not the same as exiting Emacs and starting a new session, because the > > > original Emacs didn't shut down all the way, and the PID is the same. > > > > > > > I think I'm still being unclear, sorry. > > > > I am assuming that all the regular atexit handlers have already been > > called, and that Emacs is really about to exit. (That is what I mean by > > saying that kill-emacs has been run.) So, this could be implemented by > > ensuring that the first atexit handler to be registered on startup > checks a > > "kill-emacs-and-exec" flag, and if it is set, does the exec. > > Assuming a call to 'exec' is allowed in an atexit handler. (I don't > know if it is.) > The only restrictions I can find are that a) if an atexit handler calls _exit, the remaining handlers are not called; b) if the process is terminated by a signal, the handlers are not called. The only thing you can't do is call exit() or longjmp(). You can even call "atexit" from an atexit handler (the new handler is pushed on the front of the remaining queue). -- http://rrt.sc3d.org --20cf3010e8638e7e6504f51b4fd6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 1 March 2014 10:18, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Fri, 21 Mar 2014 10:09:10 +0000
> From: Reuben Thomas <rrt@sc3d.org>
> Cc: Stefan Monnier <mon= nier@iro.umontreal.ca>, Andreas Schwab <schwab@linux-m68k.org>,
> =A0 =A0 =A0 17036@debbugs.gnu= .org
>
> > As long as it does what you want, fine. =A0= But please note that this is
> > not the same as exiting Emacs and starting a new session, because= the
> > original Emacs didn't shut down all the way, and the PID is t= he same.
> >
>
> I think I'm still being unclear, sorry.
>
> I am assuming that all the regular atexit handlers have already been > called, and that Emacs is really about to exit. (That is what I mean b= y
> saying that kill-emacs has been run.) So, this could be implemented by=
> ensuring that the first atexit handler to be registered on startup che= cks a
> "kill-emacs-and-exec" flag, and if it is set, does the exec.=

Assuming a call to 'exec' is allowed in an atexit handler. = =A0(I don't
know if it is.)

The only restrictio= ns I can find are that a) if an atexit handler calls _exit, the remaining h= andlers are not called; b) if the process is terminated by a signal, the ha= ndlers are not called. The only thing you can't do is call exit() or lo= ngjmp(). You can even call "atexit" from an atexit handler (the n= ew handler is pushed on the front of the remaining queue).
--20cf3010e8638e7e6504f51b4fd6-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 11:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: Andreas Schwab , 17036@debbugs.gnu.org, Reuben Thomas Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019550511504 (code B ref 17036); Sun, 17 Apr 2022 11:39:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 11:38:25 +0000 Received: from localhost ([127.0.0.1]:35122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3EW-0002zU-Qr for submit@debbugs.gnu.org; Sun, 17 Apr 2022 07:38:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3EU-0002zE-M2 for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 07:38:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DqgFMCzvvTiMoLQfDG6ZQKiRSIXUV5xTKEEnFTsULN0=; b=njVXCf0dsSZslP2/4B0qz9pk0D +Ovz3IgsUiSjy/4XBPW5Dn0/6MvT9ZvV4zYNs8jdpluY+3WVnSGzOcQW6ng+/TONmWwWXNHrbWY8x ogcYkXvlJm0sPYbGo8Y0wismKzif80DxYx2Pg/C08sssKTwjAImPEWNdjaPEmQa5POkY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng3EI-0004bA-Qs; Sun, 17 Apr 2022 13:38:15 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> Date: Sun, 17 Apr 2022 13:38:10 +0200 In-Reply-To: (Glenn Morris's message of "Wed, 19 Mar 2014 02:27:41 -0400") Message-ID: <874k2saqjh.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Glenn Morris writes: > I could imagine a `restart-emacs' command having some small utility. I've now added this command to Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Glenn Morris writes: > I could imagine a `restart-emacs' command having some small utility. I've now added this command to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 07:38:28 2022 Received: (at control) by debbugs.gnu.org; 17 Apr 2022 11:38:28 +0000 Received: from localhost ([127.0.0.1]:35125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3Ea-0002zk-13 for submit@debbugs.gnu.org; Sun, 17 Apr 2022 07:38:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3EY-0002zL-BP for control@debbugs.gnu.org; Sun, 17 Apr 2022 07:38:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QuzjI+bZzhCbRgOBrx1Xy2CR11fLLdGKYjaF/3I4OxE=; b=XGkGk4r3IAYglNYy4eAaIo1ifZ QDdzhSfKEDB25Db+BD9Mf6v43jal5o/TUfgBuxkKQeqboi7FluXdzvnDs+E2LgF+fl4A5F37yHzFx FUs+NO4Cgd+uh9gQTjssm9w4SSwFiIrGRF2jQqMvE39A4ldNy0zqtsSvf1yCf5RWMk+k=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng3EQ-0004bH-GX for control@debbugs.gnu.org; Sun, 17 Apr 2022 13:38:20 +0200 Date: Sun, 17 Apr 2022 13:38:17 +0200 Message-Id: <8735icaqja.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #17036 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 17036 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 17036 29.1 quit From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 11:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Glenn Morris , Andreas Schwab , 17036@debbugs.gnu.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019659521769 (code B ref 17036); Sun, 17 Apr 2022 11:57:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 11:56:35 +0000 Received: from localhost ([127.0.0.1]:35150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3W7-0005f2-33 for submit@debbugs.gnu.org; Sun, 17 Apr 2022 07:56:35 -0400 Received: from mail-pl1-f169.google.com ([209.85.214.169]:41619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3W5-0005eq-Pg for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 07:56:34 -0400 Received: by mail-pl1-f169.google.com with SMTP id s14so10403515plk.8 for <17036@debbugs.gnu.org>; Sun, 17 Apr 2022 04:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8xP77P5K2kQuT00FaGakCa36Ni20CIxEPRNA3z4t9VE=; b=DY1wNVMP3BROMnRMr9IVdKsfbXBgBJWfNDjyF+DFBrh+ZqHVmbzDT2bFgnFE/pYYqx sCYOQY/UjIIFk+g7r0o07gKQSroRFpfv6BAmBGYt2E1Jvwgt4yWN5BcB7jqirNdQpq3S Qps9R0IfSmgOWEYohj2QOE3vNG782ZZ/Bn64w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8xP77P5K2kQuT00FaGakCa36Ni20CIxEPRNA3z4t9VE=; b=04xW9UvNPYQ3uTwH9EdNobyjEpBLMI36gaaRYvMTj7jsJhxGD2juQRfgXgWAM/t8SO tbXT3hjoh2iwy80Fisk7tcTGAwmxS3oZqLBBDKWmNu3kCXEwIZ4fRpj/I8uQdecO5oWs 6B8Ge++CMFhUASNmkEkSB1J6E1olHZ+o+blNXjq8G9Cl7J+pj0pODj6fF3wNGRBfgDRv bi0phv9g+9cwhNQ9IBvGiqr+EV9OU43ApCzbtJdbKfe3V4Fv/cGn2fpErUWBFFvrnYoz 1ycvm2KdSloL1enTB7onUY0ASLY9qrmZbEXZBiyYhhWa1jjhN10g+p7RB8E4+2/+N7HP GrMQ== X-Gm-Message-State: AOAM533unKFUHiiDcq4JLTSm74p/pDxSKaorW3ZfWS6sx+RvFw9LRbb3 0/WZvJOUlXsG5yBQ0w1gmUUQIBiyoLuXq1LuW5o1Zw== X-Google-Smtp-Source: ABdhPJxg53Noc+xuurqCM4QiKYokoa32d5+kGmukeWnAkpthEQkZZg2LB0RnMbNUIYXHtO5VV3YvEiUVSCRsQq0LakE= X-Received: by 2002:a17:90b:3889:b0:1c7:a31f:2a50 with SMTP id mu9-20020a17090b388900b001c7a31f2a50mr13320052pjb.193.1650196587663; Sun, 17 Apr 2022 04:56:27 -0700 (PDT) MIME-Version: 1.0 References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> In-Reply-To: <874k2saqjh.fsf@gnus.org> From: Reuben Thomas Date: Sun, 17 Apr 2022 12:56:20 +0100 Message-ID: Content-Type: multipart/alternative; boundary="0000000000006ae8fa05dcd855d8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000006ae8fa05dcd855d8 Content-Type: text/plain; charset="UTF-8" Thanks for this! I look forward to it. -- https://rrt.sc3d.org On Sun, 17 Apr 2022, 12:38 Lars Ingebrigtsen, wrote: > Glenn Morris writes: > > > I could imagine a `restart-emacs' command having some small utility. > > I've now added this command to Emacs 29. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > --0000000000006ae8fa05dcd855d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for this! I look forward to it.=C2=A0


On Sun, 17 Apr 2022, 12:38 Lars Ingebrigtsen,= <larsi@gnus.org> wrote:
Glenn Morris <rgm@gnu.org> writes:

> I could imagine a `restart-emacs' command having some small utilit= y.

I've now added this command to Emacs 29.

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--0000000000006ae8fa05dcd855d8-- From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019670221943 (code B ref 17036); Sun, 17 Apr 2022 11:59:01 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 11:58:22 +0000 Received: from localhost ([127.0.0.1]:35155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3Xq-0005hr-Fi for submit@debbugs.gnu.org; Sun, 17 Apr 2022 07:58:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3Xp-0005he-2a for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 07:58:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng3Xi-00011i-RC; Sun, 17 Apr 2022 07:58:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iKwkuUcKNXQZNdedYtrNEOl31G/qCtJwHpisz/EQWVg=; b=Ot2pe9UfoTKn lVQWEZCf2XAnJceL+ofiLal0UYoejlD132G+OJT2EVR6+Fl8Uf+0Q+9QeY/ewPFK5syBHE45blKQ2 aZiY0/CF5LrAvJB7v+Jv3TDEGZVmCb4mbcNpaAHAkkZVPyZSPOQzmhgbE49W7p+KcL8gwCSmMrM0c o6wYYjwdwoC239xe5dFPZtESRT+6ShOq+0EPBh5MiOgYltra7ZCu6QTqg6grOJ9OKoUaEk2TvU0GC KaVopbWow6dYa4JjP+cdAMz6QKOvROcWHeG+YCnaWTyuCVcQ+TXzWxd9rwnrOv6KIHhNWoqrvlO3g r/y2cSIdxJ1OLRCX4Xme+g==; Received: from [87.69.77.57] (port=2872 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng3Xi-0001xM-63; Sun, 17 Apr 2022 07:58:14 -0400 Date: Sun, 17 Apr 2022 14:57:58 +0300 Message-Id: <83y203yla1.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <874k2saqjh.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 17 Apr 2022 13:38:10 +0200) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Resent-From: Lars Ingebrigtsen > Original-Sender: "Debbugs-submit" > Resent-CC: bug-gnu-emacs@gnu.org > Resent-Sender: help-debbugs@gnu.org > From: Lars Ingebrigtsen > Date: Sun, 17 Apr 2022 13:38:10 +0200 > Cc: 17036@debbugs.gnu.org, Andreas Schwab , > Reuben Thomas > > Glenn Morris writes: > > > I could imagine a `restart-emacs' command having some small utility. > > I've now added this command to Emacs 29. As implemented, it won't work reliably on MS-Windows, because execvp there doesn't do what you think it should. I think we should use sys_spawnve instead. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 12:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019734623078 (code B ref 17036); Sun, 17 Apr 2022 12:10:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 12:09:06 +0000 Received: from localhost ([127.0.0.1]:35175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3iD-00060A-Rg for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:09:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng3iB-0005zf-Da for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 08:09:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OV5LuKzlsUdcFE/9CguELQZVpcTA7GnJT1VVY1Dd7SQ=; b=SvnHwnRA6BRPLs2sUaL+xz5JUp 6Rr9h+1w+tV9dAAzXSbGPgGM8ewW4s5Jl471EzswB7fouK8ObdlEUYr0oBt8NSrESheaSuY+PlhX5 Ez8NeOvZlljIElmK4Uu+p26M9QsMB4dAfzCGy7v5C0reQvB6TU8JCs5wX4Wp4WGZ2rn8=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng3hy-0004vY-6L; Sun, 17 Apr 2022 14:08:54 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> Date: Sun, 17 Apr 2022 14:08:49 +0200 In-Reply-To: <83y203yla1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 14:57:58 +0300") Message-ID: <87fsmbap4e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > As implemented, it won't work reliably on MS-Windows, because execvp > there doesn't do what you think it should. I think we should use > sys_spawnve instead. Ah, I grepped for execvp to see whether we already used it, but didn't notice that the hits were from Gnulib. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > As implemented, it won't work reliably on MS-Windows, because execvp > there doesn't do what you think it should. I think we should use > sys_spawnve instead. Ah, I grepped for execvp to see whether we already used it, but didn't notice that the hits were from Gnulib. I'm not familiar with sys_spawnve -- can you do the adjustments? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.16501989529847 (code B ref 17036); Sun, 17 Apr 2022 12:36:01 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 12:35:52 +0000 Received: from localhost ([127.0.0.1]:35195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng487-0002Yl-Id for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:35:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng483-0002YU-Uc for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 08:35:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng47u-0007FL-Dd; Sun, 17 Apr 2022 08:35:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RbTdWB83ninlOa8q22LLG7O4wz73qfluOfjeDKtNznM=; b=qYosDH+qa8qF HzNnD6xrczP/b2EZchZWBa/JUpWnHvUP0svRdAjxNnrA2hAW9bwPT+M08BD9c6JpI9G/wY3Ou7/vS qyRoiIz6HD0oq/aHoGBcVSYQGiC3nAGYkR4PyQCatvsfCW10/91I9+8/Bf3TlZFK2iw9b8AScNRoM gbHBzZEa7ljaLu292bbAfntJePBn85qIFU7pReW8GcRu7gUKRkmUarBEzGgyP3z8M5Eb+qoNzxSrL KkvCEliCsxpZ5/f8+g2GqlhHV/Fe0YN6Ze/aca1YHF37+LADXFZp0edqFArwSxCIpYK2+m+IXPGel IT1Up1WaeKvRWnyRo4Le7A==; Received: from [87.69.77.57] (port=1201 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng47S-0001QQ-Rw; Sun, 17 Apr 2022 08:35:13 -0400 Date: Sun, 17 Apr 2022 15:34:55 +0300 Message-Id: <83wnfnyjkg.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87fsmbap4e.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 17 Apr 2022 14:08:49 +0200) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > Date: Sun, 17 Apr 2022 14:08:49 +0200 > > Eli Zaretskii writes: > > > As implemented, it won't work reliably on MS-Windows, because execvp > > there doesn't do what you think it should. I think we should use > > sys_spawnve instead. > > Ah, I grepped for execvp to see whether we already used it, but didn't > notice that the hits were from Gnulib. > > I'm not familiar with sys_spawnve -- can you do the adjustments? I don't think I will have the time. It isn't a simple job, because just calling sys_spawnve will not do -- that function currently supports only Emacs sub-processes. FTR, I will document below the potential issues with the current implementation of kill-emacs/restart-emacs: . when kill-emacs is called with RESTART non-nil, the value of ARG is ignored; this should at least be documented; . the exit status of the restarted Emacs is discarded, so it will not be available to the parent program, at least on MS-Windows, and also if execvp fails for some reason; . the semantics of the file descriptors open in the original Emacs process is not clear to me: will they remain open in the restarted Emacs, if the original Emacs opened them without CLOEXEC? . does the restarted Emacs belong to the same process group? should it? . on MS-Windows, if any of the argv[] command-line arguments have embedded whitespace, the restarted Emacs will not get the same elements in its argv[] array, because the Windows API for starting processes accepts the command-line arguments as a single string From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 12:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: larsi@gnus.org Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019929310438 (code B ref 17036); Sun, 17 Apr 2022 12:42:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 12:41:33 +0000 Received: from localhost ([127.0.0.1]:35209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4Dc-0002iH-RU for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:41:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4DX-0002i0-FH for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 08:41:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng4DS-0000F5-67; Sun, 17 Apr 2022 08:41:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nJI+Pqma0VuMR9M3ddSs/CEiFTal4fLcqHT57Os7nJA=; b=kLPEwDH6ozUk J+GPrhOQXysQlBmzegkt/YCQ9XuHzYTJzWj/trTVB74g10LBLZ4K+aTr5eRWTbHV/GIsD6SNG27NW obg2ammxLDRk0c7B+J4pcQD5AXeQqXSP6YUd3OOuQmevQb3wWhhNo4XgvSAfowW/nz6MMeJd1dvLh rUA4gBAdmemFxMcmYE90WK7RhqHh3zT88dqw1dOWOB7qy+nNWsF4ybeaV6v2LAUyMffDgUnPXzkYG VmNRr8AtmpVC2F1Ykzyd/3b/EWDZYHk09rMUTSJxHBSr5jw/TDrwlahlAvhi6vfTSgnGTFrwubFoT a5CeSmA7sc4dgVm5C7kagQ==; Received: from [87.69.77.57] (port=1594 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng4DR-0006D6-Jm; Sun, 17 Apr 2022 08:41:21 -0400 Date: Sun, 17 Apr 2022 15:41:06 +0300 Message-Id: <83v8v7yja5.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <83wnfnyjkg.fsf@gnu.org> (message from Eli Zaretskii on Sun, 17 Apr 2022 15:34:55 +0300) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Resent-From: Eli Zaretskii > Original-Sender: "Debbugs-submit" > Resent-CC: bug-gnu-emacs@gnu.org > Resent-Sender: help-debbugs@gnu.org > Date: Sun, 17 Apr 2022 15:34:55 +0300 > From: Eli Zaretskii > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > > > From: Lars Ingebrigtsen > > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > > Date: Sun, 17 Apr 2022 14:08:49 +0200 > > > > Eli Zaretskii writes: > > > > > As implemented, it won't work reliably on MS-Windows, because execvp > > > there doesn't do what you think it should. I think we should use > > > sys_spawnve instead. > > > > Ah, I grepped for execvp to see whether we already used it, but didn't > > notice that the hits were from Gnulib. > > > > I'm not familiar with sys_spawnve -- can you do the adjustments? > > I don't think I will have the time. It isn't a simple job, because > just calling sys_spawnve will not do -- that function currently > supports only Emacs sub-processes. > > FTR, I will document below the potential issues with the current > implementation of kill-emacs/restart-emacs: > > . when kill-emacs is called with RESTART non-nil, the value of ARG > is ignored; this should at least be documented; > . the exit status of the restarted Emacs is discarded, so it will > not be available to the parent program, at least on MS-Windows, > and also if execvp fails for some reason; > . the semantics of the file descriptors open in the original Emacs > process is not clear to me: will they remain open in the restarted > Emacs, if the original Emacs opened them without CLOEXEC? > . does the restarted Emacs belong to the same process group? should > it? > . on MS-Windows, if any of the argv[] command-line arguments have > embedded whitespace, the restarted Emacs will not get the same > elements in its argv[] array, because the Windows API for starting > processes accepts the command-line arguments as a single string And one more: . my reading of the code in 'main' is that the argv[] array is sorted as it is processed, so the restarted Emacs will get the arguments in a different order (not that it should matter too much, I think, but still: it isn't exactly the same invocation) From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 12:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019978019680 (code B ref 17036); Sun, 17 Apr 2022 12:50:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 12:49:40 +0000 Received: from localhost ([127.0.0.1]:35216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4LT-00057M-VJ for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:49:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4LS-000576-8b for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 08:49:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rG3RERrudrSNouDRpgf4Iq3HOeKwq9s7HKN0o8OhJos=; b=A5BVgxV5FcwAb5sfzegjok4+Y9 x33nbE+5ycaEMQdKLAVZhYWSWw6ZWE5XHSc+ouLQQhjt3/m1UKvSJWjeFojDIxcOdgjtG+tGOw0Rq ZdERh5fcRIFbt0xKWp5GT/pK2MVODdt92FhwhfQuJLiko2+399jqGrPPa02ZujecPTD4=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng4LF-0005Lm-Bq; Sun, 17 Apr 2022 14:49:29 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> Date: Sun, 17 Apr 2022 14:49:23 +0200 In-Reply-To: <83wnfnyjkg.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 15:34:55 +0300") Message-ID: <87wnfn98oc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > . when kill-emacs is called with RESTART non-nil, the value of ARG > is ignored; this should at least be documented; Emacs doesn't exit, so I thought it would be self-evident that ARG (which is all about the exit code) is ignored. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > . when kill-emacs is called with RESTART non-nil, the value of ARG > is ignored; this should at least be documented; Emacs doesn't exit, so I thought it would be self-evident that ARG (which is all about the exit code) is ignored. > . the exit status of the restarted Emacs is discarded, so it will > not be available to the parent program, at least on MS-Windows, > and also if execvp fails for some reason; Again, Emacs doesn't exit, so... > . the semantics of the file descriptors open in the original Emacs > process is not clear to me: will they remain open in the restarted > Emacs, if the original Emacs opened them without CLOEXEC? I thought we opened all file descriptors with CLOEXEC? If not, that's a bug, since we'd be leaking file descriptors to programs we start with `call-process', for instance. > . does the restarted Emacs belong to the same process group? should > it? I think so, and I guess so? > . on MS-Windows, if any of the argv[] command-line arguments have > embedded whitespace, the restarted Emacs will not get the same > elements in its argv[] array, because the Windows API for starting > processes accepts the command-line arguments as a single string Sounds like we should just document that this doesn't work on Windows, then. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 12:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019997619989 (code B ref 17036); Sun, 17 Apr 2022 12:53:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 12:52:56 +0000 Received: from localhost ([127.0.0.1]:35225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4Oe-0005CL-0d for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:52:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4Oc-0005C8-AN for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 08:52:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JtLL6lN+9sku3BPFbaEGmr0RBUhwMLv9PHjvdk088Yw=; b=WGuZiQWR5Mm9i3oZ1SRjtu9uuW 1tTZUG8165WKi2wRqklHS3it3BBGJCEMNF4sVJTzY0so1wreB+K44Wf7J5RvI50APwQf97vbfhiPZ 0UyYhJF1VpvPcniOz6I1neclrszSH38lxRUbRGo7BcKrp2VJtZwVus/AsAbC1/EES4AY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng4OQ-0005Mr-62; Sun, 17 Apr 2022 14:52:46 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <83v8v7yja5.fsf@gnu.org> Date: Sun, 17 Apr 2022 14:52:41 +0200 In-Reply-To: <83v8v7yja5.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 15:41:06 +0300") Message-ID: <87sfqb98iu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > And one more: > > . my reading of the code in 'main' is that the argv[] array is > sorted as it is processed, so the restarted Emacs will get the > arguments in a different order (not that it should [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > And one more: > > . my reading of the code in 'main' is that the argv[] array is > sorted as it is processed, so the restarted Emacs will get the > arguments in a different order (not that it should matter too > much, I think, but still: it isn't exactly the same invocation) Hm, so we do (in sort_args), so I guess we should store the real argv somewhere. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: larsi@gnus.org Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.16502057916747 (code B ref 17036); Sun, 17 Apr 2022 14:30:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 14:29:51 +0000 Received: from localhost ([127.0.0.1]:36847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng5uQ-0001kl-SP for submit@debbugs.gnu.org; Sun, 17 Apr 2022 10:29:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng5uO-0001kY-RU for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 10:29:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng5uI-0000P6-Sl; Sun, 17 Apr 2022 10:29:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lmfiK8uHXHmuyrcgWATgUEslJHbNIr3gt0nFkY87ZVY=; b=IVACMi4xFCL5 pneWuN3urbBtiGNVtiCXWkVox7xriM8un77XgG9qWizdbUc6cU6oyvNexFzPqjdbJ/n17UM9B8Q27 B2Blb7UPqvk3139o0eQiO0kVSuGfWpJd7gsxySVDUPDcgYgHkWFjP5L2YNdx3OMoODUfVoHfwgFAf i2mf8U8hY2q6jBuhEOC0vDyYaDp1NH0H53jyNBTr4GVWiuIDXgKGoNJBTYLrp8bHM2op/NSEMqKSM 6YYqxH0UaiBIfLrOe9ORfgDOzOTUsATC0EwsVZjLmWbPKSWDSYd3NEWCalXTuIFz1dfRfnWE1VmVF bl7cMIbBiwF4dao8j/+N3w==; Received: from [87.69.77.57] (port=4375 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng5uB-0004v7-NO; Sun, 17 Apr 2022 10:29:40 -0400 Date: Sun, 17 Apr 2022 17:29:20 +0300 Message-Id: <83tuarye9r.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <83wnfnyjkg.fsf@gnu.org> (message from Eli Zaretskii on Sun, 17 Apr 2022 15:34:55 +0300) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 17 Apr 2022 15:34:55 +0300 > From: Eli Zaretskii > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > > > From: Lars Ingebrigtsen > > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > > Date: Sun, 17 Apr 2022 14:08:49 +0200 > > > > Eli Zaretskii writes: > > > > > As implemented, it won't work reliably on MS-Windows, because execvp > > > there doesn't do what you think it should. I think we should use > > > sys_spawnve instead. > > > > Ah, I grepped for execvp to see whether we already used it, but didn't > > notice that the hits were from Gnulib. > > > > I'm not familiar with sys_spawnve -- can you do the adjustments? > > I don't think I will have the time. It isn't a simple job, because > just calling sys_spawnve will not do -- that function currently > supports only Emacs sub-processes. I eventually had an implementation idea that is much simpler than the above, so I went ahead and implemented it. It currently doesn't work in a -nw session, I hope to debug that later. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.16502062987670 (code B ref 17036); Sun, 17 Apr 2022 14:39:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 14:38:18 +0000 Received: from localhost ([127.0.0.1]:36865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng62b-0001zd-RC for submit@debbugs.gnu.org; Sun, 17 Apr 2022 10:38:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng62Z-0001zQ-Mf for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 10:38:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng62U-0001nF-Ci; Sun, 17 Apr 2022 10:38:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9buyHZrcdWvC3/9v8onqPKGUNXsxDT5GHya0GJ/YwdA=; b=gFQLFMnYGTG1 8oYlEJLdkWGCi6vkCV7mFm1SkA+MeSHA/lhvup+loCD7hm+ft6wuARh9n0rYp3EQCLZdoJa2jsBUG FcaTXUDgT7vS/wPOW9OQHijFzU/cYUvEusXnjg8xvRsKLAKkef/APw+e+IVCfXtFMn9oKeZEDuR/u K1hM+cEI+WITw/TWwu9dQrb3xrT1Xi6nM/qBM8oID6Lana2UduBoE4P6QbZ3WxTKy7utDionZDJTU H7T1fVPg9gTnzwN6p5Nu2aNYbHndHqn9FWSIKzTc0w/Ud9+qeKs2S17HfHclZH/OZpFDiN5crggM9 BUWwIqTuyQlDk28wfRhIiQ==; Received: from [87.69.77.57] (port=4906 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng62S-0001XQ-4T; Sun, 17 Apr 2022 10:38:09 -0400 Date: Sun, 17 Apr 2022 17:37:53 +0300 Message-Id: <83sfqbydvi.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wnfn98oc.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 17 Apr 2022 14:49:23 +0200) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <87wnfn98oc.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > Date: Sun, 17 Apr 2022 14:49:23 +0200 > > Eli Zaretskii writes: > > > . when kill-emacs is called with RESTART non-nil, the value of ARG > > is ignored; this should at least be documented; > > Emacs doesn't exit, so I thought it would be self-evident that ARG > (which is all about the exit code) is ignored. Let's see how evident is it ;-) > > . the exit status of the restarted Emacs is discarded, so it will > > not be available to the parent program, at least on MS-Windows, > > and also if execvp fails for some reason; > > Again, Emacs doesn't exit, so... I meant when the restarted Emacs exits. It _can_ exit, can't it? > > . the semantics of the file descriptors open in the original Emacs > > process is not clear to me: will they remain open in the restarted > > Emacs, if the original Emacs opened them without CLOEXEC? > > I thought we opened all file descriptors with CLOEXEC? If not, that's a > bug, since we'd be leaking file descriptors to programs we start with > `call-process', for instance. What about stadin/stdout/stderr etc.? > > . does the restarted Emacs belong to the same process group? should > > it? > > I think so, and I guess so? Is that guaranteed? should we make sure it's so? Or is it unimportant? > > . on MS-Windows, if any of the argv[] command-line arguments have > > embedded whitespace, the restarted Emacs will not get the same > > elements in its argv[] array, because the Windows API for starting > > processes accepts the command-line arguments as a single string > > Sounds like we should just document that this doesn't work on Windows, > then. It works now, at least in the GUI sessions. Some other questions related to this: . AFAIU, the execvp'ed process inherits the environment of the calling process, so any changes to the environment will be propagated to the child, right? Do we want that? . What about the working directory? If the original Emacs was invoked with --chdir, the restart happens in another directory; moreover, relative program name in argv[0] and relative directory name in --chdir may not work. Is that a problem? . What should happen to client frames when Emacs is restarted? What does happen with the current implementation, .e.g if some of the client frames are on other displays? A lot of this stuff has to do with the semantics of "restarting" Emacs: what exactly does that mean, and what should users expect/not expect when they restart Emacs? From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 14:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.16502069988917 (code B ref 17036); Sun, 17 Apr 2022 14:50:01 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 14:49:58 +0000 Received: from localhost ([127.0.0.1]:36879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng6Du-0002Jl-GL for submit@debbugs.gnu.org; Sun, 17 Apr 2022 10:49:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng6Ds-0002JY-Rh for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 10:49:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hDCZDeXHS+PAa5sc+WCCqBJu3htEH9VxM88fQjDaPBE=; b=dg01g1aNSdmIg1mL9aGVrrsqs1 Ta8tFrRbwZE9xh3824VdZ2G2hVZatbAaL/1WbjnSJj88gITDRhqj4bkR2o5cW/AGdOGf9kdMD6/G1 GpjVxIQgZVgiJBVSmksElB+rCi1xB6P+KrtuHXwOXh7wSeX4vnnW7kzLwUJqk68/DW58=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng6Df-0006US-Ri; Sun, 17 Apr 2022 16:49:48 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <87wnfn98oc.fsf@gnus.org> <83sfqbydvi.fsf@gnu.org> Date: Sun, 17 Apr 2022 16:49:42 +0200 In-Reply-To: <83sfqbydvi.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 17:37:53 +0300") Message-ID: <8735ib933t.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> > . the exit status of the restarted Emacs is discarded, so it will >> > not be available to the parent program, at least on MS-Windows, >> > and also if execvp fails for some reason; >> >> Again, [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> > . the exit status of the restarted Emacs is discarded, so it will >> > not be available to the parent program, at least on MS-Windows, >> > and also if execvp fails for some reason; >> >> Again, Emacs doesn't exit, so... > > I meant when the restarted Emacs exits. It _can_ exit, can't it? If you exit from the new process, then you'll get the exit code from that next call to `kill-emacs'? >> I thought we opened all file descriptors with CLOEXEC? If not, that's a >> bug, since we'd be leaking file descriptors to programs we start with >> `call-process', for instance. > > What about stadin/stdout/stderr etc.? Those are inherited, I think. (Which is good.) >> > . does the restarted Emacs belong to the same process group? should >> > it? >> >> I think so, and I guess so? > > Is that guaranteed? should we make sure it's so? Or is it > unimportant? I think that whatever the OS does here by default is what's correct, so it's not something we need to worry about. >> Sounds like we should just document that this doesn't work on Windows, >> then. > > It works now, at least in the GUI sessions. Great! > Some other questions related to this: > > . AFAIU, the execvp'ed process inherits the environment of the > calling process, so any changes to the environment will be > propagated to the child, right? Do we want that? I'm not quite sure. We could save envp and call execve instead with that saved envp (I think?), but I think using the environment is what we want here. Probably? But perhaps that should be an option... > . What about the working directory? If the original Emacs was > invoked with --chdir, the restart happens in another directory; > moreover, relative program name in argv[0] and relative directory > name in --chdir may not work. Is that a problem? Ah, yes it is. --chdir and relative names stops this from working, so that needs fixing, I think. > . What should happen to client frames when Emacs is restarted? What > does happen with the current implementation, .e.g if some of the > client frames are on other displays? I expect those to disappear. We're restarting Emacs, after all. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165021072231760 (code B ref 17036); Sun, 17 Apr 2022 15:53:01 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 15:52:02 +0000 Received: from localhost ([127.0.0.1]:36987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng7By-0008G4-9M for submit@debbugs.gnu.org; Sun, 17 Apr 2022 11:52:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng7Bw-0008Fj-3Y for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 11:52:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng7Bq-0004E3-9v; Sun, 17 Apr 2022 11:51:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=w0OVvQOwjNkWemy3KnZb3Kuh+/wMzfZ9kDQpdKILkos=; b=W5bs43ijhRIb q11t3T1IDJOFgoFaBLjSK6zzu5K0CfgCkcaypg9OukxhnJmJq3xhO5VKCGwlPUWv9SXWy25RzWfLG mkVvEaRUsCMKvsF2ShbgyybJx5/UlEV6Rdrhb5EGjvx7oKouZiMvJpPqWTpVa5+1FcoHTvnrH0/5W eYxZC8oZg/gH/EiXhCMTzFZ8O4l76dmU8nijcobc09lESNX1zJlOjDsowV4oaSInx1syYFF+HYSBK KwHswJb50IOPi4jDjIGu7oqZZlpMT/4lwhk1ybyS7Aa/6bYfACVd/2DyR2H5GM2AFfL9gGTK8Qa4G 0n2BPit0tlzVHMTERxw1tA==; Received: from [87.69.77.57] (port=1555 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng7Bp-0001iq-O7; Sun, 17 Apr 2022 11:51:54 -0400 Date: Sun, 17 Apr 2022 18:51:39 +0300 Message-Id: <83lew3yagk.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <8735ib933t.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 17 Apr 2022 16:49:42 +0200) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <87wnfn98oc.fsf@gnus.org> <83sfqbydvi.fsf@gnu.org> <8735ib933t.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > Date: Sun, 17 Apr 2022 16:49:42 +0200 > > Eli Zaretskii writes: > > >> > . the exit status of the restarted Emacs is discarded, so it will > >> > not be available to the parent program, at least on MS-Windows, > >> > and also if execvp fails for some reason; > >> > >> Again, Emacs doesn't exit, so... > > > > I meant when the restarted Emacs exits. It _can_ exit, can't it? > > If you exit from the new process, then you'll get the exit code from > that next call to `kill-emacs'? Do you see that returned to the shell? From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 15:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: larsi@gnus.org Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165021111132378 (code B ref 17036); Sun, 17 Apr 2022 15:59:02 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 15:58:31 +0000 Received: from localhost ([127.0.0.1]:37005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng7IF-0008Q9-0n for submit@debbugs.gnu.org; Sun, 17 Apr 2022 11:58:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng7ID-0008Pw-7E for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 11:58:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng7I7-0004zX-OO; Sun, 17 Apr 2022 11:58:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wjjitK5tKr17AbxvpXeClZaYXaZVpNc0rnRu96XImoI=; b=HQCx+DiH4U/8 F0rBsSfCkwEnwJD/tHtbi5qSZqGMSFNa+1Bgh9jbH25aycPW2a2v6NNStVV/iERCJOXXliACyS+4Z 9e92TxONG5NVT9cZE37FJ6JTioJ8i08pAGftRrHgdJ81ymCwdHHSYry1538U8OsDT0ONrcZawyQe8 LF7pBaCkyHswoOtIRtPQHOPO9pjlGRmLbnB+Vp8GY0chFxwjFM68d0mFBKVU92twXsbYbPg8MXjIu 8oUkT37bZhST2lTBqIGwamxiESwzqx0x9LH9WMkKKm9GaPFL6lDCBNfjgVqtTwwCw6/pVuCBONDo1 fsryoHxocDYKN4PpPCTHmw==; Received: from [87.69.77.57] (port=1949 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng7I2-0005pe-Qs; Sun, 17 Apr 2022 11:58:19 -0400 Date: Sun, 17 Apr 2022 18:58:05 +0300 Message-Id: <83k0bnya5u.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <83tuarye9r.fsf@gnu.org> (message from Eli Zaretskii on Sun, 17 Apr 2022 17:29:20 +0300) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <83tuarye9r.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 17 Apr 2022 17:29:20 +0300 > From: Eli Zaretskii > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > > I eventually had an implementation idea that is much simpler than the > above, so I went ahead and implemented it. It currently doesn't work > in a -nw session, I hope to debug that later. The problems in the -nw session have something top do with the parent releasing the console device and the restarted child attaching to it; I'm unable to get that to work (not really surprising, as I know very little about the subtleties of the Windows console sharing). So for now I just made restart-emacs fail in the -nw case on MS-Windows. Btw, calling 'error' in this place, which we also do on Posix platforms, is not very useful: this is past the call to shut_down_emacs, so all 'error' does at this point is exit with an error status, and the error message is lost. Something to keep in mind, I guess. From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.1650211350459 (code B ref 17036); Sun, 17 Apr 2022 16:03:01 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 16:02:30 +0000 Received: from localhost ([127.0.0.1]:37011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng7M6-00007K-LD for submit@debbugs.gnu.org; Sun, 17 Apr 2022 12:02:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng7M4-00006u-V1 for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 12:02:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kCkVvR1gwZSNmITqu5twJQedGVVjL2hXaN7m1Y1AQrA=; b=lKd+giieCtkKl7MT90lBOTovBk 0eotcuW+Hk6GDreoGjT2Y8zF4eRZkjpuKiuQnOfPcSAuWg1b6rFcgeu25mWIUrV37wA7oifWCpkqc N6z/cmAINyXGaDzODKbEOSiQZPnpXvAEgaSOa4NaQ04pUi/50c4QEXGyxstzaHPhpPcE=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng7Ls-0007G4-CQ; Sun, 17 Apr 2022 18:02:20 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <83tuarye9r.fsf@gnu.org> <83k0bnya5u.fsf@gnu.org> Date: Sun, 17 Apr 2022 18:02:15 +0200 In-Reply-To: <83k0bnya5u.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 18:58:05 +0300") Message-ID: <87mtgj7l6g.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Btw, calling 'error' in this place, which we also do on Posix > platforms, is not very useful: this is past the call to > shut_down_emacs, so all 'error' does at this point is exit with an > error s [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Btw, calling 'error' in this place, which we also do on Posix > platforms, is not very useful: this is past the call to > shut_down_emacs, so all 'error' does at this point is exit with an > error status, and the error message is lost. Something to keep in > mind, I guess. It prints the error message OK on Debian, at least, but I guess emacs_perror is the function to use here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Apr 2022 17:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165021777327888 (code B ref 17036); Sun, 17 Apr 2022 17:50:01 +0000 Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 17:49:33 +0000 Received: from localhost ([127.0.0.1]:37099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng91g-0007Fk-OB for submit@debbugs.gnu.org; Sun, 17 Apr 2022 13:49:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng91f-0007FW-Fy for 17036@debbugs.gnu.org; Sun, 17 Apr 2022 13:49:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng91Y-0004Di-Eu; Sun, 17 Apr 2022 13:49:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lUdmRMP5O+HUUgDRVVi4qMBp5+/NL4PdYKL/Ti9eKb4=; b=c5oBBtxudUuI ZEeWQ+7IYhZ6PR0iifQ20w6S2tielJi9AkxJ2DpyB+2cprnlpPISg9zjskfcoH5c/JhV6izF3jupj OU6bYX7vFkgweS3J2EK51Ir0+Dwqg9XlHyALx+D4bIWC3kKNdsPESCVxLok3BUM5s/I0pY5gtyI7w GhE14B2r1bqCV3JYkeA3GXnawF1sRbUUdiX8najMuwhQLMpsqxbQ0I6W8RVlaXRPhe9dG9GJcw6i8 8axu0VwkpCvYAQPPyyoBZoQjVaExft9f3h3kmZ8m1OWjc068Yrz+w/FGqPxwE810KL0/QU4MDzJNO eTxM99M64OM4yUaVlte0iA==; Received: from [87.69.77.57] (port=4865 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng91X-0007Rh-4Z; Sun, 17 Apr 2022 13:49:23 -0400 Date: Sun, 17 Apr 2022 20:49:09 +0300 Message-Id: <83bkwzy50q.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87mtgj7l6g.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 17 Apr 2022 18:02:15 +0200) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <83tuarye9r.fsf@gnu.org> <83k0bnya5u.fsf@gnu.org> <87mtgj7l6g.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > Date: Sun, 17 Apr 2022 18:02:15 +0200 > > Eli Zaretskii writes: > > > Btw, calling 'error' in this place, which we also do on Posix > > platforms, is not very useful: this is past the call to > > shut_down_emacs, so all 'error' does at this point is exit with an > > error status, and the error message is lost. Something to keep in > > mind, I guess. > > It prints the error message OK on Debian, at least, but I guess > emacs_perror is the function to use here? I guess so. Although that will be lost as well if Emacs is invoked as a GUI program from some desktop shortcut or in some other fancy way which redirects the standard handles to the great void... From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Apr 2022 08:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165027171010461 (code B ref 17036); Mon, 18 Apr 2022 08:49:01 +0000 Received: (at 17036) by debbugs.gnu.org; 18 Apr 2022 08:48:30 +0000 Received: from localhost ([127.0.0.1]:37921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngN3e-0002ie-M0 for submit@debbugs.gnu.org; Mon, 18 Apr 2022 04:48:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngN3c-0002iS-KO for 17036@debbugs.gnu.org; Mon, 18 Apr 2022 04:48:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HQHX0JYpV+rm/AKb1AZBtRLvYIXGQf/jZcSnaXc8MxY=; b=dHpcPNU2DU018IT2V7ixjeaM56 aDOrgG0oq1Hfe1Ru50Lp6HBbShEsoVmMN5MnPgKAeYAE56EqhLSioMlcZH6/qanFChHnc87ZUry+E QP90n9txi+EXZsUkI3HogBAaDxGHLJqsZLZ7rxYEtYrCJgYz9kLKxxLNKzgbNnX+4dyw=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngN3S-0008IC-C5; Mon, 18 Apr 2022 10:48:20 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <87wnfn98oc.fsf@gnus.org> <83sfqbydvi.fsf@gnu.org> <8735ib933t.fsf@gnus.org> <83lew3yagk.fsf@gnu.org> Date: Mon, 18 Apr 2022 10:48:17 +0200 In-Reply-To: <83lew3yagk.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 18:51:39 +0300") Message-ID: <87r15ulqum.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> If you exit from the new process, then you'll get the exit code from >> that next call to `kill-emacs'? > > Do you see that returned to the shell? When you finally exit (without restarting), the function returns the same value as always, so I think I must be misunderstanding what you mean here. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> If you exit from the new process, then you'll get the exit code from >> that next call to `kill-emacs'? > > Do you see that returned to the shell? When you finally exit (without restarting), the function returns the same value as always, so I think I must be misunderstanding what you mean here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Apr 2022 08:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165027201310925 (code B ref 17036); Mon, 18 Apr 2022 08:54:01 +0000 Received: (at 17036) by debbugs.gnu.org; 18 Apr 2022 08:53:33 +0000 Received: from localhost ([127.0.0.1]:37929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngN8X-0002q9-FQ for submit@debbugs.gnu.org; Mon, 18 Apr 2022 04:53:33 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngN8V-0002px-Ug for 17036@debbugs.gnu.org; Mon, 18 Apr 2022 04:53:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QTRHPOnRwnG5b3WZA/RAkV6Uu9QQJx6oTkBBUPcBukc=; b=vU+tTNBRS4Exay9eAWXi3Dxk/Q uQazujBIGZshxsKEwF0cYQEQofy0vSC88S5tfZryZBcm3Xuot+sL7XHgBgKcmkiO4T6fqblmXrB+F 2A7BA08DGi5bOzUaGBkk5YtiFtlAZ1Ywv0tw2XZd5Di+46cwSNazB67khMr0ntbIv3pE=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngN8L-0008Jk-Ft; Mon, 18 Apr 2022 10:53:23 +0200 From: Lars Ingebrigtsen References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <83tuarye9r.fsf@gnu.org> <83k0bnya5u.fsf@gnu.org> <87mtgj7l6g.fsf@gnus.org> <83bkwzy50q.fsf@gnu.org> Date: Mon, 18 Apr 2022 10:53:20 +0200 In-Reply-To: <83bkwzy50q.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 20:49:09 +0300") Message-ID: <87mtgilqm7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > I guess so. Although that will be lost as well if Emacs is invoked as > a GUI program from some desktop shortcut or in some other fancy way > which redirects the standard handles to the great void.. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > I guess so. Although that will be lost as well if Emacs is invoked as > a GUI program from some desktop shortcut or in some other fancy way > which redirects the standard handles to the great void... Yup, but we've already shut down Emacs at this point, so I don't think we can do much more. But there is one check we could do at a more meaningful point: We could check whether argv[0] points to a binary that exists at the start of `kill-emacs' and then signal an error. That will probably be the (by far) most common problem in practice, so it's worth doing that, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:51:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Apr 2022 09:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, schwab@linux-m68k.org, 17036@debbugs.gnu.org, rrt@sc3d.org Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165027414622852 (code B ref 17036); Mon, 18 Apr 2022 09:30:01 +0000 Received: (at 17036) by debbugs.gnu.org; 18 Apr 2022 09:29:06 +0000 Received: from localhost ([127.0.0.1]:38029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngNgw-0005wV-E2 for submit@debbugs.gnu.org; Mon, 18 Apr 2022 05:29:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngNgg-0005vl-02 for 17036@debbugs.gnu.org; Mon, 18 Apr 2022 05:29:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngNgY-0006YD-MO; Mon, 18 Apr 2022 05:28:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=B8BVS9/WUFmtmQBiDIGc4M1rQ/DV00+za0mmJQnnxB8=; b=oXf4BDVvol81 oSVhzOgkdYH0NodXNJhTczZbE9d/mb8UuAZG9C6tDiod9fz5HBG6KeZcxUlkVkT8KzJlByQyR7nDl eoxCkhFi/yKBlzx1EXdJmXNhUKbTxxZyD+z43mqB3dcswXBQ8tnt4NZeqEIQThUOyRHVr4ltjTo+M GlTAplh54Wip4dJtgyESXgWOqvgc/hAZv+eOeTzKyRDqrmr8JN55pyOJwDyzWCPWhSU6O+h4TK0nd +FLvaH2JoO6yd7z7MsOLe4H31EUuieMfxr5rgqaM4lE+fPL7L5+MOGZDFIjEmKwNlzAzL7DGJBIsU QbF+Iw6mlZamjyx6699xBQ==; Received: from [87.69.77.57] (port=4237 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngNgW-000299-22; Mon, 18 Apr 2022 05:28:40 -0400 Date: Mon, 18 Apr 2022 12:28:28 +0300 Message-Id: <83czhewxj7.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87r15ulqum.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 18 Apr 2022 10:48:17 +0200) References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> <87wnfn98oc.fsf@gnus.org> <83sfqbydvi.fsf@gnu.org> <8735ib933t.fsf@gnus.org> <83lew3yagk.fsf@gnu.org> <87r15ulqum.fsf@gnus.org> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org > Date: Mon, 18 Apr 2022 10:48:17 +0200 > > Eli Zaretskii writes: > > >> If you exit from the new process, then you'll get the exit code from > >> that next call to `kill-emacs'? > > > > Do you see that returned to the shell? > > When you finally exit (without restarting), the function returns the > same value as always, so I think I must be misunderstanding what you > mean here. I was just asking whether this was checked and worked correctly.