From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#17036: Continuation for Emacs: invoking a process on exit? Date: Fri, 21 Mar 2014 10:09:10 +0000 Message-ID: References: <874n2v9l10.fsf@igel.home> <8361na9lom.fsf@gnu.org> <83r45x8re9.fsf@gnu.org> <83txas7ol8.fsf@gnu.org> <8361n86l8i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3011dc83bdfdf504f51b1364 X-Trace: ger.gmane.org 1395396669 18927 80.91.229.3 (21 Mar 2014 10:11:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 10:11:09 +0000 (UTC) Cc: Andreas Schwab , 17036@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 21 11:11:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQwQ1-0000aZ-RW for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 11:11:18 +0100 Original-Received: from localhost ([::1]:51659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQwQ1-0004UV-CT for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 06:11:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQwOv-00026j-3G for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 06:10:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQwOp-0006kZ-GO for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 06:10:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQwOp-0006iA-DX for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 06:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WQwOo-0001qx-2y for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 06:10:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 17036-submit@debbugs.gnu.org id=B17036.13953965557032 (code B ref 17036); Fri, 21 Mar 2014 10:10:01 +0000 Original-Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:09:15 +0000 Original-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 Original-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 Original-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 X-Received: by 10.236.87.174 with SMTP id y34mr688918yhe.141.1395396550969; Fri, 21 Mar 2014 03:09:10 -0700 (PDT) Original-Received: by 10.170.137.66 with HTTP; Fri, 21 Mar 2014 03:09:10 -0700 (PDT) In-Reply-To: <8361n86l8i.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87091 Archived-At: --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--