GNU bug report logs - #17036
Continuation for Emacs: invoking a process on exit?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Reuben Thomas <rrt@HIDDEN>; dated Tue, 18 Mar 2014 22:48:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:26:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 21 06:26:02 2014
Received: from localhost ([127.0.0.1]:42986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQweG-0002Nx-4b
	for submit <at> 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 <rrt@HIDDEN>) id 1WQweA-0002NS-Vu
 for 17036 <at> 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 <at> 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@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
 <83txas7ol8.fsf@HIDDEN>
 <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
 <8361n86l8i.fsf@HIDDEN>
 <CAOnWdogBcqNkiDJHeZASpuQHx=RokNC5PE+p9x8Cy7XoNWtioA@HIDDEN>
 <83lhw36eit.fsf@HIDDEN>
Date: Fri, 21 Mar 2014 10:25:54 +0000
Message-ID: <CAOnWdojH-2ot11ni4bgzQVrGWULqyX8V2TsefF_hC6n-DRENTw@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=20cf3010e8638e7e6504f51b4fd6
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--20cf3010e8638e7e6504f51b4fd6
Content-Type: text/plain; charset=ISO-8859-1

On 21 March 2014 10:18, Eli Zaretskii <eliz@HIDDEN> wrote:

> > Date: Fri, 21 Mar 2014 10:09:10 +0000
> > From: Reuben Thomas <rrt@HIDDEN>
> > Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <
> schwab@HIDDEN>,
> >       17036 <at> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2=
1 March 2014 10:18, Eli Zaretskii <span dir=3D"ltr">&lt;<a href=3D"mailto:e=
liz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
&gt; Date: Fri, 21 Mar 2014 10:09:10 +0000<br>
<div class=3D"">&gt; From: Reuben Thomas &lt;<a href=3D"mailto:rrt@HIDDEN=
">rrt@HIDDEN</a>&gt;<br>
&gt; Cc: Stefan Monnier &lt;<a href=3D"mailto:monnier@HIDDEN">mon=
nier@HIDDEN</a>&gt;, Andreas Schwab &lt;<a href=3D"mailto:schwab@=
linux-m68k.org">schwab@HIDDEN</a>&gt;,<br>
&gt; =A0 =A0 =A0 <a href=3D"mailto:17036 <at> debbugs.gnu.org">17036@HIDDEN=
.org</a><br>
&gt;<br>
</div><div class=3D"">&gt; &gt; As long as it does what you want, fine. =A0=
But please note that this is<br>
&gt; &gt; not the same as exiting Emacs and starting a new session, because=
 the<br>
&gt; &gt; original Emacs didn&#39;t shut down all the way, and the PID is t=
he same.<br>
&gt; &gt;<br>
&gt;<br>
&gt; I think I&#39;m still being unclear, sorry.<br>
&gt;<br>
&gt; I am assuming that all the regular atexit handlers have already been<b=
r>
&gt; called, and that Emacs is really about to exit. (That is what I mean b=
y<br>
&gt; saying that kill-emacs has been run.) So, this could be implemented by=
<br>
&gt; ensuring that the first atexit handler to be registered on startup che=
cks a<br>
&gt; &quot;kill-emacs-and-exec&quot; flag, and if it is set, does the exec.=
<br>
<br>
</div>Assuming a call to &#39;exec&#39; is allowed in an atexit handler. =
=A0(I don&#39;t<br>
know if it is.)<br>
</blockquote></div><br></div><div class=3D"gmail_extra">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&#39;t do is call exit() or lo=
ngjmp(). You can even call &quot;atexit&quot; from an atexit handler (the n=
ew handler is pushed on the front of the remaining queue).<br clear=3D"all"=
>
</div><div class=3D"gmail_extra"><br>-- <br><a href=3D"http://rrt.sc3d.org"=
>http://rrt.sc3d.org</a>
</div></div>

--20cf3010e8638e7e6504f51b4fd6--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:18:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 21 06:18:33 2014
Received: from localhost ([127.0.0.1]:42970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQwX2-00026m-M7
	for submit <at> 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 <rrt@HIDDEN>) id 1WQwX0-00026e-MW
 for 17036 <at> 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 <at> 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: <CAOnWdogBcqNkiDJHeZASpuQHx=RokNC5PE+p9x8Cy7XoNWtioA@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
 <83txas7ol8.fsf@HIDDEN>
 <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
 <8361n86l8i.fsf@HIDDEN>
 <CAOnWdogBcqNkiDJHeZASpuQHx=RokNC5PE+p9x8Cy7XoNWtioA@HIDDEN>
Date: Fri, 21 Mar 2014 10:18:30 +0000
Message-ID: <CAOnWdojd9mc+f=Hwc_YR0p1bGx8EbTbwBRNVZXHyNPeu+5oxuQ@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c1f53c13639504f51b350f
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c1f53c13639504f51b350f
Content-Type: text/plain; charset=ISO-8859-1

On 21 March 2014 10:09, Reuben Thomas <rrt@HIDDEN> wrote:

>
> On 21 March 2014 07:53, Eli Zaretskii <eliz@HIDDEN> wrote:
>
>> > Date: Thu, 20 Mar 2014 23:10:19 +0000
>> > From: Reuben Thomas <rrt@HIDDEN>
>> > Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <
>> schwab@HIDDEN>,
>> >       17036 <at> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2=
1 March 2014 10:09, Reuben Thomas <span dir=3D"ltr">&lt;<a href=3D"mailto:r=
rt@HIDDEN" target=3D"_blank">rrt@HIDDEN</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
<br><div dir=3D"ltr"><div><div class=3D"h5"><div class=3D"gmail_extra"><div=
 class=3D"gmail_quote">On 21 March 2014 07:53, Eli Zaretskii <span dir=3D"l=
tr">&lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&=
gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
&gt; Date: Thu, 20 Mar 2014 23:10:19 +0000<br>
<div>&gt; From: Reuben Thomas &lt;<a href=3D"mailto:rrt@HIDDEN" target=3D=
"_blank">rrt@HIDDEN</a>&gt;<br>
&gt; Cc: Stefan Monnier &lt;<a href=3D"mailto:monnier@HIDDEN" tar=
get=3D"_blank">monnier@HIDDEN</a>&gt;, Andreas Schwab &lt;<a href=
=3D"mailto:schwab@HIDDEN" target=3D"_blank">schwab@HIDDEN</=
a>&gt;,<br>

&gt; =A0 =A0 =A0 <a href=3D"mailto:17036 <at> debbugs.gnu.org" target=3D"_blank"=
>17036 <at> debbugs.gnu.org</a><br>
&gt;<br>
</div><div>&gt; I&#39;m sorry, I seem to have made a total hash of explaini=
ng something really<br>
&gt; simple. In effect, I want kill-emacs-and-exec, which takes a list of<b=
r>
&gt; arguments, runs kill-emacs, and then execs the argument list.<br>
<br>
</div>As long as it does what you want, fine. =A0But please note that this =
is<br>
not the same as exiting Emacs and starting a new session, because the<br>
original Emacs didn&#39;t shut down all the way, and the PID is the same.<b=
r>
</blockquote></div><br></div></div></div><div class=3D"gmail_extra">I think=
 I&#39;m still being unclear, sorry.<br><br></div><div class=3D"gmail_extra=
">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 &quot;kill=
-emacs-and-exec&quot; 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.<span class=3D"HOEnZb"><font colo=
r=3D"#888888"><br clear=3D"all">

</font></span></div></div></blockquote><div><br></div><div>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().<br clear=3D"all=
">
</div></div><br>-- <br><a href=3D"http://rrt.sc3d.org">http://rrt.sc3d.org<=
/a>
</div></div>

--001a11c1f53c13639504f51b350f--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:18:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 21 06:18:24 2014
Received: from localhost ([127.0.0.1]:42967 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQwWt-00026M-Lm
	for submit <at> 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 <eliz@HIDDEN>) id 1WQwWq-000264-Hw
 for 17036 <at> 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@HIDDEN> for 17036 <at> 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@HIDDEN>;
 Fri, 21 Mar 2014 12:18:18 +0200 (IST)
Date: Fri, 21 Mar 2014 12:18:34 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
In-reply-to: <CAOnWdogBcqNkiDJHeZASpuQHx=RokNC5PE+p9x8Cy7XoNWtioA@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Reuben Thomas <rrt@HIDDEN>
Message-id: <83lhw36eit.fsf@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
 <83txas7ol8.fsf@HIDDEN>
 <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
 <8361n86l8i.fsf@HIDDEN>
 <CAOnWdogBcqNkiDJHeZASpuQHx=RokNC5PE+p9x8Cy7XoNWtioA@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, schwab@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 21 Mar 2014 10:09:10 +0000
> From: Reuben Thomas <rrt@HIDDEN>
> Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <schwab@HIDDEN>, 
> 	17036 <at> 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.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 10:09:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 21 06:09:15 2014
Received: from localhost ([127.0.0.1]:42963 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQwO2-0001pM-Eq
	for submit <at> 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 <rrt@HIDDEN>) id 1WQwNz-0001p4-Ir
 for 17036 <at> 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 <at> 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@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
 <83txas7ol8.fsf@HIDDEN>
 <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
 <8361n86l8i.fsf@HIDDEN>
Date: Fri, 21 Mar 2014 10:09:10 +0000
Message-ID: <CAOnWdogBcqNkiDJHeZASpuQHx=RokNC5PE+p9x8Cy7XoNWtioA@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=20cf3011dc83bdfdf504f51b1364
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--20cf3011dc83bdfdf504f51b1364
Content-Type: text/plain; charset=ISO-8859-1

On 21 March 2014 07:53, Eli Zaretskii <eliz@HIDDEN> wrote:

> > Date: Thu, 20 Mar 2014 23:10:19 +0000
> > From: Reuben Thomas <rrt@HIDDEN>
> > Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <
> schwab@HIDDEN>,
> >       17036 <at> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2=
1 March 2014 07:53, Eli Zaretskii <span dir=3D"ltr">&lt;<a href=3D"mailto:e=
liz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
&gt; Date: Thu, 20 Mar 2014 23:10:19 +0000<br>
<div class=3D"">&gt; From: Reuben Thomas &lt;<a href=3D"mailto:rrt@HIDDEN=
">rrt@HIDDEN</a>&gt;<br>
&gt; Cc: Stefan Monnier &lt;<a href=3D"mailto:monnier@HIDDEN">mon=
nier@HIDDEN</a>&gt;, Andreas Schwab &lt;<a href=3D"mailto:schwab@=
linux-m68k.org">schwab@HIDDEN</a>&gt;,<br>
&gt; =A0 =A0 =A0 <a href=3D"mailto:17036 <at> debbugs.gnu.org">17036@HIDDEN=
.org</a><br>
&gt;<br>
</div><div class=3D"">&gt; I&#39;m sorry, I seem to have made a total hash =
of explaining something really<br>
&gt; simple. In effect, I want kill-emacs-and-exec, which takes a list of<b=
r>
&gt; arguments, runs kill-emacs, and then execs the argument list.<br>
<br>
</div>As long as it does what you want, fine. =A0But please note that this =
is<br>
not the same as exiting Emacs and starting a new session, because the<br>
original Emacs didn&#39;t shut down all the way, and the PID is the same.<b=
r>
</blockquote></div><br></div><div class=3D"gmail_extra">I think I&#39;m sti=
ll being unclear, sorry.<br><br></div><div class=3D"gmail_extra">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 &quot;kill-emacs-and-e=
xec&quot; 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.<br clear=3D"all">
</div><div class=3D"gmail_extra"><br>-- <br><a href=3D"http://rrt.sc3d.org"=
>http://rrt.sc3d.org</a>
</div></div>

--20cf3011dc83bdfdf504f51b1364--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 21 Mar 2014 07:53:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 21 03:53:24 2014
Received: from localhost ([127.0.0.1]:42882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQuGZ-0006O0-RD
	for submit <at> 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 <eliz@HIDDEN>) id 1WQuGW-0006Nh-FB
 for 17036 <at> 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@HIDDEN> for 17036 <at> 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@HIDDEN>;
 Fri, 21 Mar 2014 09:53:18 +0200 (IST)
Date: Fri, 21 Mar 2014 09:53:33 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
In-reply-to: <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Reuben Thomas <rrt@HIDDEN>
Message-id: <8361n86l8i.fsf@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
 <83txas7ol8.fsf@HIDDEN>
 <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, schwab@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 20 Mar 2014 23:10:19 +0000
> From: Reuben Thomas <rrt@HIDDEN>
> Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <schwab@HIDDEN>, 
> 	17036 <at> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 23:10:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 20 19:10:26 2014
Received: from localhost ([127.0.0.1]:42746 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQm6T-0008Pw-QY
	for submit <at> 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 <rrt@HIDDEN>) id 1WQm6N-0008Pj-LZ
 for 17036 <at> 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 <at> 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@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
 <83txas7ol8.fsf@HIDDEN>
Date: Thu, 20 Mar 2014 23:10:19 +0000
Message-ID: <CAOnWdog-ui9_ajC5919UM6t19+Wy2dy3KDOf_t5q3vRskyH9CA@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=20cf3010ebfd7676fd04f511df40
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--20cf3010ebfd7676fd04f511df40
Content-Type: text/plain; charset=ISO-8859-1

On 20 March 2014 17:43, Eli Zaretskii <eliz@HIDDEN> wrote:

> > Date: Thu, 20 Mar 2014 12:02:49 +0000
> > From: Reuben Thomas <rrt@HIDDEN>
> > Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <
> schwab@HIDDEN>,
> >       17036 <at> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2=
0 March 2014 17:43, Eli Zaretskii <span dir=3D"ltr">&lt;<a href=3D"mailto:e=
liz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
&gt; Date: Thu, 20 Mar 2014 12:02:49 +0000<br>
<div class=3D"">&gt; From: Reuben Thomas &lt;<a href=3D"mailto:rrt@HIDDEN=
">rrt@HIDDEN</a>&gt;<br>
&gt; Cc: Stefan Monnier &lt;<a href=3D"mailto:monnier@HIDDEN">mon=
nier@HIDDEN</a>&gt;, Andreas Schwab &lt;<a href=3D"mailto:schwab@=
linux-m68k.org">schwab@HIDDEN</a>&gt;,<br>
&gt; =A0 =A0 =A0 <a href=3D"mailto:17036 <at> debbugs.gnu.org">17036@HIDDEN=
.org</a><br>
&gt;<br>
</div><div class=3D"">&gt; I didn&#39;t discuss the command (it was Glenn M=
orris who suggested the name),<br>
&gt; but in my original bug report I said: &quot;This would be useful for r=
estarting<br>
</div>&gt; having updated my configuration...as it would save having manual=
ly to issue a<br>
&gt; new &#39;emacs&#39; command...&quot; For this, a simple &quot;exec ema=
cs&quot; is enough, but why<br>
<div class=3D"">&gt; not throw in command-line arguments too.<br>
<br>
</div>I&#39;m probably missing something, because I don&#39;t see how &quot=
;exec emacs&quot;<br>
will do what you want.</blockquote><div><br></div><div>I&#39;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.<br>
<br></div><div>In fact, since kill-emacs can&#39;t currently take a list, i=
t could be extended to do so.<br><br></div><div>save-buffers-kill-emacs cou=
ld be likewise extended.<br><br>Does that make sense now?<br></div></div>
</div></div>

--20cf3010ebfd7676fd04f511df40--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 17:43:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 20 13:43:23 2014
Received: from localhost ([127.0.0.1]:42607 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQgzy-0007Bm-EC
	for submit <at> 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 <eliz@HIDDEN>) id 1WQgzv-0007Bd-IX
 for 17036 <at> 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@HIDDEN> for 17036 <at> 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@HIDDEN>;
 Thu, 20 Mar 2014 19:43:18 +0200 (IST)
Date: Thu, 20 Mar 2014 19:43:31 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
In-reply-to: <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Reuben Thomas <rrt@HIDDEN>
Message-id: <83txas7ol8.fsf@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
 <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, schwab@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 20 Mar 2014 12:02:49 +0000
> From: Reuben Thomas <rrt@HIDDEN>
> Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <schwab@HIDDEN>, 
> 	17036 <at> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 12:02:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 20 08:02:55 2014
Received: from localhost ([127.0.0.1]:41924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQbgU-0002RV-3I
	for submit <at> 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 <rrt@HIDDEN>) id 1WQbgQ-0002RI-Je
 for 17036 <at> 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 <at> 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@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
 <83r45x8re9.fsf@HIDDEN>
Date: Thu, 20 Mar 2014 12:02:49 +0000
Message-ID: <CAOnWdognANysqs2=+QfBMqs09Q09-=Y6GaTRecmpPcJk1WTP4A@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=20cf301af33553288204f5088c3a
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--20cf301af33553288204f5088c3a
Content-Type: text/plain; charset=ISO-8859-1

On 20 March 2014 03:45, Eli Zaretskii <eliz@HIDDEN> wrote:

> > Date: Wed, 19 Mar 2014 21:14:22 +0000
> > From: Reuben Thomas <rrt@HIDDEN>
> > Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <
> schwab@HIDDEN>,
> >       17036 <at> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2=
0 March 2014 03:45, Eli Zaretskii <span dir=3D"ltr">&lt;<a href=3D"mailto:e=
liz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">
&gt; Date: Wed, 19 Mar 2014 21:14:22 +0000<br>
&gt; From: Reuben Thomas &lt;<a href=3D"mailto:rrt@HIDDEN">rrt@HIDDEN</=
a>&gt;<br>
&gt; Cc: Stefan Monnier &lt;<a href=3D"mailto:monnier@HIDDEN">mon=
nier@HIDDEN</a>&gt;, Andreas Schwab &lt;<a href=3D"mailto:schwab@=
linux-m68k.org">schwab@HIDDEN</a>&gt;,<br>
&gt; &nbsp; &nbsp; &nbsp; <a href=3D"mailto:17036 <at> debbugs.gnu.org">17036@de=
bbugs.gnu.org</a><br>
&gt;<br>
<div class=3D"">&gt; &gt; Don&#39;t believe the sales people. &nbsp;MS&#39;=
s execvp is buggy, and even if we<br>
&gt; &gt; forget about those bugs, it won&#39;t do what is expected here: i=
t won&#39;t<br>
&gt; &gt; keep the file descriptors open in the original process still open=
 in<br>
&gt; &gt; the overlaid process. &nbsp;That&#39;s because there&#39;s no &#3=
9;exec&#39; system call on<br>
&gt; &gt; Windows, so execvp is _emulated_: the original process simply inv=
okes<br>
&gt; &gt; the new one as its child process, and then immediately exits.<br>
&gt; &gt;<br>
&gt;<br>
&gt; That&#39;s good enough for restart-emacs.<br>
<br>
</div>Maybe so, it&#39;s hard to say, since you never described what that s=
hould<br>
do.<br></blockquote><div><br></div><div>I didn&#39;t discuss the command (i=
t was Glenn Morris who suggested the name), but in my original bug report I=
 said: &quot;This would be useful for restarting having updated my configur=
ation&hellip;as it would save having manually to=20
issue a new &#39;<span class=3D"">emacs</span>&#39; command&hellip;&quot; F=
or this, a simple &quot;exec emacs&quot; is enough, but why not throw in co=
mmand-line arguments too.<br>&nbsp;</div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex">

<div class=3D"">
</div>I very much doubt that this limitation would not render the whole<br>
issue moot on Windows. &nbsp;E.g., how will restart-emacs then be different=
<br>
from a simple call-process?</blockquote><div><br></div><div>Because Emacs d=
oes not continue running after it exits. As I said in my second email to th=
is bug: &quot;&hellip;to reexec Emacs, it needs to be a proper exec [so tha=
t] Emacs=20
has[&hellip;] finished shutting down when it runs.&quot;<br><br></div><div>=
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.<br>
</div><div>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> &=
nbsp;But again, since you didn&#39;t say what the<br>
feature is supposed to do, ...<br>
</blockquote></div><br></div><div class=3D"gmail_extra">A tail-call, but fo=
r processes. (BTW, sorry to have mentioned call/cc earlier, that was a bad =
analogy.)<br></div><div class=3D"gmail_extra"><br>-- <br><a href=3D"http://=
rrt.sc3d.org">http://rrt.sc3d.org</a>
</div></div>

--20cf301af33553288204f5088c3a--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 20 Mar 2014 03:45:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 23:45:12 2014
Received: from localhost ([127.0.0.1]:41769 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQTup-0004Gw-7h
	for submit <at> 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 <eliz@HIDDEN>) id 1WQTum-0004Gj-6n
 for 17036 <at> 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@HIDDEN> for 17036 <at> 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@HIDDEN>;
 Thu, 20 Mar 2014 05:45:06 +0200 (IST)
Date: Thu, 20 Mar 2014 05:45:18 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
In-reply-to: <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Reuben Thomas <rrt@HIDDEN>
Message-id: <83r45x8re9.fsf@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
 <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, schwab@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Wed, 19 Mar 2014 21:14:22 +0000
> From: Reuben Thomas <rrt@HIDDEN>
> Cc: Stefan Monnier <monnier@HIDDEN>, Andreas Schwab <schwab@HIDDEN>, 
> 	17036 <at> 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, ...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 21:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 17:14:29 2014
Received: from localhost ([127.0.0.1]:41615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQNoj-0000lc-Eq
	for submit <at> 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 <rrt@HIDDEN>) id 1WQNoc-0000lQ-Nu
 for 17036 <at> 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 <at> 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@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
 <8361na9lom.fsf@HIDDEN>
Date: Wed, 19 Mar 2014 21:14:22 +0000
Message-ID: <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=089e01160d0ef3a82604f4fc2295
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e01160d0ef3a82604f4fc2295
Content-Type: text/plain; charset=ISO-8859-1

On 19 March 2014 16:51, Eli Zaretskii <eliz@HIDDEN> wrote:

> > Date: Wed, 19 Mar 2014 13:19:28 +0000
> > From: Reuben Thomas <rrt@HIDDEN>
> > Cc: Andreas Schwab <schwab@HIDDEN>, 17036 <at> debbugs.gnu.org
> >
> > On 19 March 2014 13:10, Stefan <monnier@HIDDEN> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1=
9 March 2014 16:51, Eli Zaretskii <span dir=3D"ltr">&lt;<a href=3D"mailto:e=
liz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
&gt; Date: Wed, 19 Mar 2014 13:19:28 +0000<br>
&gt; From: Reuben Thomas &lt;<a href=3D"mailto:rrt@HIDDEN">rrt@HIDDEN</=
a>&gt;<br>
&gt; Cc: Andreas Schwab &lt;<a href=3D"mailto:schwab@HIDDEN">schwab=
@linux-m68k.org</a>&gt;, <a href=3D"mailto:17036 <at> debbugs.gnu.org">17036@deb=
bugs.gnu.org</a><br>
<div class=3D"">&gt;<br>
&gt; On 19 March 2014 13:10, Stefan &lt;<a href=3D"mailto:monnier@HIDDEN=
real.ca">monnier@HIDDEN</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; &gt; I could imagine a `restart-emacs&#39; command having some sm=
all utility.<br>
&gt; &gt;<br>
&gt; &gt; Could the w32 build support something like POSIX&#39;s `exec&#39;=
?<br>
&gt;<br>
&gt;<br>
</div>&gt; Windows has execvp... <a href=3D"http://msdn.microsoft.com/en-us=
/library/3xw6zy53.aspx" target=3D"_blank">http://msdn.microsoft.com/en-us/l=
ibrary/3xw6zy53.aspx</a><br>
<br>
Don&#39;t believe the sales people. =A0MS&#39;s execvp is buggy, and even i=
f we<br>
forget about those bugs, it won&#39;t do what is expected here: it won&#39;=
t<br>
keep the file descriptors open in the original process still open in<br>
the overlaid process. =A0That&#39;s because there&#39;s no &#39;exec&#39; s=
ystem call on<br>
Windows, so execvp is _emulated_: the original process simply invokes<br>
the new one as its child process, and then immediately exits.<br></blockquo=
te><div><br></div><div>That&#39;s good enough for restart-emacs.<br></div><=
div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex">


So the answer to Stefan is: no, this cannot be done on Windows, not<br>
without some custom code to let the re-executed Emacs inherit all of<br>
the file descriptors which were open in the original Emacs process.<br>
</blockquote></div><br></div><div class=3D"gmail_extra">It&#39;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.<br clear=3D"all">
</div><div class=3D"gmail_extra"><br>-- <br><a href=3D"http://rrt.sc3d.org"=
>http://rrt.sc3d.org</a>
</div></div>

--089e01160d0ef3a82604f4fc2295--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 16:51:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 12:51:02 2014
Received: from localhost ([127.0.0.1]:41404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQJhl-0001Zy-Ep
	for submit <at> 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 <eliz@HIDDEN>) id 1WQJhf-0001Zj-Tn
 for 17036 <at> 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@HIDDEN> for
 17036 <at> 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@HIDDEN>; Wed, 19 Mar 2014 18:50:50 +0200 (IST)
Date: Wed, 19 Mar 2014 18:51:05 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
In-reply-to: <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Reuben Thomas <rrt@HIDDEN>
Message-id: <8361na9lom.fsf@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
 <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, schwab@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Wed, 19 Mar 2014 13:19:28 +0000
> From: Reuben Thomas <rrt@HIDDEN>
> Cc: Andreas Schwab <schwab@HIDDEN>, 17036 <at> debbugs.gnu.org
> 
> On 19 March 2014 13:10, Stefan <monnier@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 13:19:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 09:19:33 2014
Received: from localhost ([127.0.0.1]:40809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQGP7-0003Nu-Cs
	for submit <at> 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 <rrt@HIDDEN>) id 1WQGP3-0003Nj-Ns
 for 17036 <at> 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 <at> 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: <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
 <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
Date: Wed, 19 Mar 2014 13:19:28 +0000
Message-ID: <CAOnWdoji8fT5JCK7zzBJL7FS-PfnVfQPZevHEvJ-zGoc6OF7zA@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Stefan <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=20cf3011e2a3a00db104f4f58008
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: Glenn Morris <rgm@HIDDEN>, 17036 <at> debbugs.gnu.org,
 Andreas Schwab <schwab@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--20cf3011e2a3a00db104f4f58008
Content-Type: text/plain; charset=ISO-8859-1

On 19 March 2014 13:10, Stefan <monnier@HIDDEN> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1=
9 March 2014 13:10, Stefan <span dir=3D"ltr">&lt;<a href=3D"mailto:monnier@=
iro.umontreal.ca" target=3D"_blank">monnier@HIDDEN</a>&gt;</span>=
 wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div class=3D"">&gt; I co=
uld imagine a `restart-emacs&#39; command having some small utility.<br>
<br>
</div>Could the w32 build support something like POSIX&#39;s `exec&#39;?</b=
lockquote><div><br></div><div>Windows has execvp&hellip; <a href=3D"http://=
msdn.microsoft.com/en-us/library/3xw6zy53.aspx">http://msdn.microsoft.com/e=
n-us/library/3xw6zy53.aspx</a><br>
</div></div><br>-- <br><a href=3D"http://rrt.sc3d.org">http://rrt.sc3d.org<=
/a>
</div></div>

--20cf3011e2a3a00db104f4f58008--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 13:10:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 09:10:45 2014
Received: from localhost ([127.0.0.1]:40803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQGGb-00039J-Cj
	for submit <at> 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 <monnier@HIDDEN>) id 1WQGGY-000397-89
 for 17036 <at> 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 <monnier@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
Message-ID: <jwv1txy1gif.fsf-monnier+emacsbugs@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
 <enzjkm3dpe.fsf@HIDDEN>
Date: Wed, 19 Mar 2014 09:10:41 -0400
In-Reply-To: <enzjkm3dpe.fsf@HIDDEN> (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-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>,
 Reuben Thomas <rrt@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 19 Mar 2014 06:27:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 02:27:48 2014
Received: from localhost ([127.0.0.1]:40650 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQ9yc-0005iy-8U
	for submit <at> 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 <rgm@HIDDEN>) id 1WQ9yY-0005ij-Jx
 for 17036 <at> 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 <rgm@HIDDEN>)
 id 1WQ9yX-0005zN-5J; Wed, 19 Mar 2014 02:27:41 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
 <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
X-Spook: interception Axis of Evil Mafia STARLAN Operation Iraqi
X-Ran: <^x:+DqL5*goOty1b:c%]/7>'-N`0g~Ah?/<j='M$zVP3o1tkFWf.D_AK5wg}>i)GP2A;S
X-Hue: blue
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Wed, 19 Mar 2014 02:27:41 -0400
Message-ID: <enzjkm3dpe.fsf@HIDDEN>
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-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org, Andreas Schwab <schwab@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


I could imagine a `restart-emacs' command having some small utility.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 18 Mar 2014 22:56:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 18 18:56:39 2014
Received: from localhost ([127.0.0.1]:40503 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQ2w2-0000fB-IH
	for submit <at> 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 <rrt@HIDDEN>) id 1WQ2vz-0000f1-7R
 for 17036 <at> 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 <at> 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@HIDDEN>
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 <874n2v9l10.fsf@HIDDEN>
Date: Tue, 18 Mar 2014 22:56:34 +0000
Message-ID: <CAOnWdoifjf1kcB02z3A2jO37DE549LH9E9dHO3NRbZyLBBkF_Q@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Content-Type: multipart/alternative; boundary=20cf30063822a04c7104f4e9729d
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--20cf30063822a04c7104f4e9729d
Content-Type: text/plain; charset=ISO-8859-1

On 18 March 2014 22:52, Andreas Schwab <schwab@HIDDEN> wrote:

> Reuben Thomas <rrt@HIDDEN> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1=
8 March 2014 22:52, Andreas Schwab <span dir=3D"ltr">&lt;<a href=3D"mailto:=
schwab@HIDDEN" target=3D"_blank">schwab@HIDDEN</a>&gt;</spa=
n> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Reuben Thomas &lt;<a href=3D"mailto:rrt@sc3d=
.org">rrt@HIDDEN</a>&gt; writes:<br>
<br>
&gt; Is there a way to give Emacs itself a continuation, i.e. a command to =
exec<br>
&gt; when it exits?<br>
<br>
kill-emacs-hook?<br></blockquote><div><br></div><div>That&#39;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&#39;s surely not safe? Emacs hasn&#39;t finished shutt=
ing down when it runs&hellip;<br>
</div><div><br></div></div>-- <br><a href=3D"http://rrt.sc3d.org">http://rr=
t.sc3d.org</a>
</div></div>

--20cf30063822a04c7104f4e9729d--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at 17036 <at> debbugs.gnu.org:


Received: (at 17036) by debbugs.gnu.org; 18 Mar 2014 22:53:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 18 18:53:05 2014
Received: from localhost ([127.0.0.1]:40498 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQ2sa-0000YY-Mw
	for submit <at> 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 <whitebox@HIDDEN>) id 1WQ2sY-0000Xw-5z
 for 17036 <at> 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 <schwab@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
Subject: Re: bug#17036: Continuation for Emacs: invoking a process on exit?
References: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
X-Yow: Are we on STRIKE yet?
Date: Tue, 18 Mar 2014 23:52:59 +0100
In-Reply-To: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
 (Reuben Thomas's message of "Tue, 18 Mar 2014 22:47:29 +0000")
Message-ID: <874n2v9l10.fsf@HIDDEN>
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-Debbugs-Envelope-To: 17036
Cc: 17036 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Reuben Thomas <rrt@HIDDEN> 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@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Mar 2014 22:47:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 18 18:47:50 2014
Received: from localhost ([127.0.0.1]:40493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQ2nV-0000Nh-NP
	for submit <at> 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 <rrt@HIDDEN>) id 1WQ2nT-0000NV-02
 for submit <at> 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 <rrt@HIDDEN>) id 1WQ2nR-0005zo-5z
 for submit <at> 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 <rrt@HIDDEN>)
 id 1WQ2nR-0005zk-2x
 for submit <at> 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 <rrt@HIDDEN>) id 1WQ2nP-0005CH-Ds
 for bug-gnu-emacs@HIDDEN; Tue, 18 Mar 2014 18:47:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1WQ2nO-0005zB-14
 for bug-gnu-emacs@HIDDEN; 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 <rrt@HIDDEN>)
 id 1WQ2nE-0005ww-NW
 for bug-gnu-emacs@HIDDEN; 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 <rrt@HIDDEN>) id 1WQ2nE-0007A1-6l
 for bug-emacs@HIDDEN; Tue, 18 Mar 2014 18:47:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1WQ2nC-0005wn-Nn
 for bug-emacs@HIDDEN; 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 <rrt@HIDDEN>)
 id 1WQ2nC-0005wj-G7
 for bug-emacs@HIDDEN; Tue, 18 Mar 2014 18:47:30 -0400
Received: by mail-yk0-f178.google.com with SMTP id 79so20933418ykr.9
 for <bug-emacs@HIDDEN>; 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: <CAOnWdogQ2-TzGB3mJjVT0BRO62LuVn83-yEqVyP45WfMRygBbg@HIDDEN>
Subject: Continuation for Emacs: invoking a process on exit?
From: Reuben Thomas <rrt@HIDDEN>
To: bug-emacs <bug-emacs@HIDDEN>
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-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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

<div dir=3D"ltr"><div><div>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.<br>
<br></div>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 &quot;emacs&quot; command having waited for it to shut down; ove=
rall, up to several brain-seconds if I don&#39;t just sit and watch the pro=
cess.<br>
<br></div>It also seems appropriately Lispy to allow a Lisp system&#39;s fi=
nal action to be to call a continuation&hellip;<br clear=3D"all"><div><div>=
<div><br>-- <br><a href=3D"http://rrt.sc3d.org">http://rrt.sc3d.org</a>
</div></div></div></div>

--e89a8f64782d28879c04f4e95212--




Acknowledgement sent to Reuben Thomas <rrt@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#17036; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.