From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Date: Sun, 17 Apr 2022 18:58:05 +0300 Message-ID: <83k0bnya5u.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12630"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org To: larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 17 17:59:09 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng7Ir-00035B-N2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Apr 2022 17:59:09 +0200 Original-Received: from localhost ([::1]:32842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ng7Iq-0003nR-8K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Apr 2022 11:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng7Ik-0003nG-Iq for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 11:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ng7Ik-00051m-AB for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 11:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ng7Ik-0008Qx-9y for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 11:59:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165021111132378 (code B ref 17036); Sun, 17 Apr 2022 15:59:02 +0000 Original-Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 15:58:31 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: <83tuarye9r.fsf@gnu.org> (message from Eli Zaretskii on Sun, 17 Apr 2022 17:29:20 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230080 Archived-At: > 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.