GNU bug report logs - #19688
[patch] add support for emacs daemon on Windows

Previous Next

Package: emacs;

Reported by: Mark Laws <mdl <at> 60hz.org>

Date: Sun, 25 Jan 2015 19:59:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 19688 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mark Laws <mdl <at> 60hz.org>
Cc: 19688 <at> debbugs.gnu.org
Subject: Re: bug#19688: [patch] add support for emacs daemon on Windows
Date: Sat, 14 Feb 2015 15:28:34 +0200
> Date: Sat, 14 Feb 2015 22:16:46 +0900
> From: Mark Laws <mdl <at> 60hz.org>
> Cc: 19688 <at> debbugs.gnu.org
> 
> On Unix, emacsclient forks and execs (#1) emacs --daemon, which in
> turn execs (#2) itself. emacsclient waits on #1, which is told when to
> quit via the pipe between #1 and #2, and when it quits, we know that
> the daemon must be ready.
> 
> > My understanding is that your Windows variant of the above is to wait
> > on an event that is signaled by Emacs when it starts in daemon mode.
> > My question is: can we use something similar to Unix here, like
> > 'WaitForInputIdle'?  After all, the above call to 'waitpid' just tells
> > us the daemon process is past its initialization stage, as far as the
> > OS is concerned, which isn't too fine-grained.  Perhaps even
> > repeatedly calling 'GetExitCodeProcess' until it returns STILL_ACTIVE
> > for the first time would be a faithful enough emulation of what
> > 'waitpid' does here?
> 
> On Windows, the Emacs process created by emacsclient initializes
> daemon mode itself, so neither of those would give us a way of knowing
> that the daemon has actually been initialized. That's why we have to
> use an event on Windows.

I don't see why 'WaitForInputIdle' wouldn't work.  Can you explain?
AFAIU, it waits until the process is idle, which means it did all the
initialization and is ready for accepting connections.  Am I missing
something?

> > P.S. What's up with your copyright assignment?  I still don't see it
> > on file.
> 
> Sorry, I sent it to copyright-clerk <at> fsf.org (since that's where it
> came from) instead of assign <at> gnu.org. I sent it to the latter just
> now.

Thanks.




This bug report was last modified 10 years and 143 days ago.

Previous Next


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