|Subject:||bug#17036: Continuation for Emacs: invoking a process on exit?|
|Date:||Wed, 19 Mar 2014 21:14:22 +0000|
> Date: Wed, 19 Mar 2014 13:19:28 +0000
> From: Reuben Thomas <address@hidden>
> Cc: Andreas Schwab <address@hidden>, address@hidden
>> Windows has execvp... http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx
> On 19 March 2014 13:10, Stefan <address@hidden> wrote:
> > > I could imagine a `restart-emacs' command having some small utility.
> > Could the w32 build support something like POSIX's `exec'?
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.
|[Prev in Thread]||Current Thread||[Next in Thread]|