unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 17036@debbugs.gnu.org
Subject: bug#17036: Continuation for Emacs: invoking a process on exit?
Date: Wed, 19 Mar 2014 21:14:22 +0000	[thread overview]
Message-ID: <CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@mail.gmail.com> (raw)
In-Reply-To: <8361na9lom.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

On 19 March 2014 16:51, Eli Zaretskii <eliz@gnu.org> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2418 bytes --]

  reply	other threads:[~2014-03-19 21:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 22:47 bug#17036: Continuation for Emacs: invoking a process on exit? Reuben Thomas
2014-03-18 22:52 ` Andreas Schwab
2014-03-18 22:56   ` Reuben Thomas
2014-03-19  6:27     ` Glenn Morris
2014-03-19 13:10       ` Stefan
2014-03-19 13:19         ` Reuben Thomas
2014-03-19 16:51           ` Eli Zaretskii
2014-03-19 21:14             ` Reuben Thomas [this message]
2014-03-20  3:45               ` Eli Zaretskii
2014-03-20 12:02                 ` Reuben Thomas
2014-03-20 17:43                   ` Eli Zaretskii
2014-03-20 23:10                     ` Reuben Thomas
2014-03-21  7:53                       ` Eli Zaretskii
2014-03-21 10:09                         ` Reuben Thomas
2014-03-21 10:18                           ` Reuben Thomas
2014-03-21 10:18                           ` Eli Zaretskii
2014-03-21 10:25                             ` Reuben Thomas
2022-04-17 11:38       ` Lars Ingebrigtsen
2022-04-17 11:56         ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-17 11:57         ` Eli Zaretskii
2022-04-17 12:08           ` Lars Ingebrigtsen
2022-04-17 12:34             ` Eli Zaretskii
2022-04-17 12:41               ` Eli Zaretskii
2022-04-17 12:52                 ` Lars Ingebrigtsen
2022-04-17 12:49               ` Lars Ingebrigtsen
2022-04-17 14:37                 ` Eli Zaretskii
2022-04-17 14:49                   ` Lars Ingebrigtsen
2022-04-17 15:51                     ` Eli Zaretskii
2022-04-18  8:48                       ` Lars Ingebrigtsen
2022-04-18  9:28                         ` Eli Zaretskii
2022-04-17 14:29               ` Eli Zaretskii
2022-04-17 15:58                 ` Eli Zaretskii
2022-04-17 16:02                   ` Lars Ingebrigtsen
2022-04-17 17:49                     ` Eli Zaretskii
2022-04-18  8:53                       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOnWdohMHkn8zDHikRHnGof=kOXLV0pqpTfA5y_w8OUX8m1-Mw@mail.gmail.com' \
    --to=rrt@sc3d.org \
    --cc=17036@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).