# HG changeset patch # User Dan Nicolaescu # Date 1222286286 0 # Node ID d83896198aaea4a4e61eaebc2b8448ce15a6fef1 # Parent c5442f5091097a4db35073444532115ade086902 * lisp.h (is_daemon): Declare. * dispnew.c (init_display): Do not try to initialize the terminal when running as a daemon. diff -r c5442f509109 -r d83896198aae src/ChangeLog --- a/src/ChangeLog Wed Sep 24 19:14:58 2008 +0000 +++ b/src/ChangeLog Wed Sep 24 19:58:06 2008 +0000 @@ -1,3 +1,9 @@ +2008-09-24 Dan Nicolaescu + + * lisp.h (is_daemon): Declare. + * dispnew.c (init_display): Do not try to initialize the terminal + when running as a daemon. + 2008-09-22 Chong Yidong * nsfns.m (compute_tip_xy): Use x_display_pixel_width and diff -r c5442f509109 -r d83896198aae src/dispnew.c --- a/src/dispnew.c Wed Sep 24 19:14:58 2008 +0000 +++ b/src/dispnew.c Wed Sep 24 19:58:06 2008 +0000 @@ -6892,6 +6892,10 @@ } #endif + /* If running as a daemon, no need to initialize any frames/terminal. */ + if (is_daemon) + return; + /* If no window system has been specified, try to use the terminal. */ if (! isatty (0)) { diff -r c5442f509109 -r d83896198aae src/lisp.h --- a/src/lisp.h Wed Sep 24 19:14:58 2008 +0000 +++ b/src/lisp.h Wed Sep 24 19:58:06 2008 +0000 @@ -3118,6 +3118,8 @@ void shut_down_emacs P_ ((int, int, Lisp_Object)); /* Nonzero means don't do interactive redisplay and don't change tty modes */ extern int noninteractive; +/* Nonzero means Emacs was started as a daemon. */ +extern int is_daemon; /* Nonzero means don't do use window-system-specific display code */ extern int inhibit_window_system; /* Nonzero means that a filter or a sentinel is running. */