bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19688: [patch] add support for emacs daemon on Windows


From: Mark Laws
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@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\ /\ |\ |< |_ /\ \^| //





reply via email to

[Prev in Thread] Current Thread [Next in Thread]