changeset 98327:d83896198aae

* lisp.h (is_daemon): Declare. * dispnew.c (init_display): Do not try to initialize the terminal when running as a daemon.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 24 Sep 2008 19:58:06 +0000
parents c5442f509109
children 7a4e70e656a1
files src/ChangeLog src/dispnew.c src/lisp.h
diffstat 3 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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  <dann@ics.uci.edu>
+
+	* 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  <cyd@stupidchicken.com>
 
 	* nsfns.m (compute_tip_xy): Use x_display_pixel_width and
--- 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))
     {
--- 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.  */