From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Date: Sun, 17 Apr 2022 14:49:23 +0200 Message-ID: <87wnfn98oc.fsf@gnus.org> References: <874n2v9l10.fsf@igel.home> <874k2saqjh.fsf@gnus.org> <83y203yla1.fsf@gnu.org> <87fsmbap4e.fsf@gnus.org> <83wnfnyjkg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24500"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 17 14:51:01 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 1ng4Mn-0006BV-4j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Apr 2022 14:51:01 +0200 Original-Received: from localhost ([::1]:50332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ng4Ml-00054k-Gf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Apr 2022 08:50:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng4Lr-00054F-GK for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 08:50:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ng4Lq-0001pG-4D for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 08:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ng4Lq-000582-27 for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 08:50:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.165019978019680 (code B ref 17036); Sun, 17 Apr 2022 12:50:02 +0000 Original-Received: (at 17036) by debbugs.gnu.org; 17 Apr 2022 12:49:40 +0000 Original-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 Original-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=; Original-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 In-Reply-To: <83wnfnyjkg.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Apr 2022 15:34:55 +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:230049 Archived-At: 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