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


View this message in rfc822 format

From: Mark Laws <mdl <at> 60hz.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19688 <at> debbugs.gnu.org
Subject: bug#19688: [patch] add support for emacs daemon on Windows
Date: Sun, 15 Feb 2015 06:15:24 +0900
On Sun, Feb 15, 2015 at 4:29 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> It's up to you.  It's no big deal either way.

Well, we'd need to also split the Windows part of
daemon_check_preconditions into a one-line function just to avoid
having INVALID_HANDLE_VALUE in emacs.c:

#ifdef WINDOWSNT
  /* IS_DAEMON above already checks that w32_daemon_event != NULL, so only
     check that we successfully started the daemon here.  */
  if (w32_daemon_event == INVALID_HANDLE_VALUE)
#else
  if (daemon_pipe[1] < 0 )
#endif

...and we'd have to move the code earlier in the file that calls
CreateEvent. Also, since w32.c seems to mostly be a place for utility
functions (it does not contain state variables), and the Unix
daemon_pipe stuff is in emacs.c, it would be weird to put the Windows
daemon variable in a completely different place.

Basically, it doesn't really seem worth complicating the general flow
of emacs.c for the sake of moving a few Windows-isms when w32.h is
already included anyway--not to mention, there's already other
OS-specific code throughout the file.

Sorry if I've misinterpreted you, i.e. if what you meant was "please
just move the Windows junk to w32.c", in which case I'll get on it
later today. But otherwise, I think the current patch makes the code
easier to follow.

-- 
|v\ /\ |\ |< |_ /\ \^| //




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.