From 73fee52267dfcaf79217c0476eab4c421f5b7702 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 24 Sep 2008 19:58:06 +0000 Subject: [PATCH] * lisp.h (is_daemon): Declare. * dispnew.c (init_display): Do not try to initialize the terminal when running as a daemon. --- src/ChangeLog | 6 ++++++ src/dispnew.c | 4 ++++ src/lisp.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index f2b82b231bf..b0689ee9c89 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/dispnew.c b/src/dispnew.c index 48a8bd283c3..0f8f174eb7c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6892,6 +6892,10 @@ init_display () } #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 --git a/src/lisp.h b/src/lisp.h index d013a04553e..268d5b64eea 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3118,6 +3118,8 @@ void synchronize_system_time_locale P_ ((void)); 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. */ -- 2.39.5