aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorMark Laws2015-02-27 12:43:30 +0200
committerEli Zaretskii2015-02-27 12:43:30 +0200
commit805fe507087b9675a010a30a8a8840587ffdf5be (patch)
tree9b91858096495590692d1f5fe814cb64d9712f8b /src/lisp.h
parent6ef14349fa73922473ba8202e256f20e17661b25 (diff)
downloademacs-805fe507087b9675a010a30a8a8840587ffdf5be.tar.gz
emacs-805fe507087b9675a010a30a8a8840587ffdf5be.zip
Support daemon mode on MS-Windows (bug#19688)
src/emacs.c <w32_daemon_event> [WINDOWSNT]: New global var. (main) [WINDOWSNT]: Initialize it to NULL. Create the event to signal clients we are ready for connections. (Fdaemon_initialized): Use DAEMON_RUNNING. [WINDOWSNT]: MS-Windows specific code to signal clients we are ready for connections. src/lisp.h (DAEMON_RUNNING): New macro, encapsulates Posix and MS-Windows conditions for running in daemon mode. src/minibuf.c (read_minibuf): Use DAEMON_RUNNING. src/keyboard.c (kbd_buffer_get_event): Use DAEMON_RUNNING. src/dispnew.c (init_display) [WINDOWSNT]: Initialize frames/terminal even in daemon mode. nt/inc/ms-w32.h (W32_DAEMON_EVENT): New macro. lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't reject empty arguments for --alternate-editor. (print_help_and_exit) [WINDOWSNT]: Don't refrain from advertising empty arguments for --alternate-editor. (start_daemon_and_retry_set_socket) [WINDOWSNT]: MS-Windows specific code to start Emacs in daemon mode and wait for it to be ready for client connections. lisp/server.el (server-process-filter): Force GUI frames on MS-Windows in daemon mode, even if a TTY frame was requested. lisp/frameset.el (frameset-keep-original-display-p): Don't assume windows-nt cannot be in daemon mode. lisp/frame.el (window-system-for-display): Don't assume windows-nt cannot be in daemon mode.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 9764b096ef0..fb436776121 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4222,9 +4222,16 @@ extern bool noninteractive;
4222extern bool no_site_lisp; 4222extern bool no_site_lisp;
4223 4223
4224/* Pipe used to send exit notification to the daemon parent at 4224/* Pipe used to send exit notification to the daemon parent at
4225 startup. */ 4225 startup. On Windows, we use a kernel event instead. */
4226#ifndef WINDOWSNT
4226extern int daemon_pipe[2]; 4227extern int daemon_pipe[2];
4227#define IS_DAEMON (daemon_pipe[1] != 0) 4228#define IS_DAEMON (daemon_pipe[1] != 0)
4229#define DAEMON_RUNNING (daemon_pipe[1] >= 0)
4230#else /* WINDOWSNT */
4231extern void *w32_daemon_event;
4232#define IS_DAEMON (w32_daemon_event != NULL)
4233#define DAEMON_RUNNING (w32_daemon_event != INVALID_HANDLE_VALUE)
4234#endif
4228 4235
4229/* True if handling a fatal error already. */ 4236/* True if handling a fatal error already. */
4230extern bool fatal_error_in_progress; 4237extern bool fatal_error_in_progress;