* lisp.h (is_daemon): Declare.
authorDan Nicolaescu <dann@ics.uci.edu>
Wed, 24 Sep 2008 19:58:06 +0000 (19:58 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Wed, 24 Sep 2008 19:58:06 +0000 (19:58 +0000)
* dispnew.c (init_display): Do not try to initialize the terminal
when running as a daemon.

src/ChangeLog
src/dispnew.c
src/lisp.h

index f2b82b2..b0689ee 100644 (file)
@@ -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
index 48a8bd2..0f8f174 100644 (file)
@@ -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))
     {
index d013a04..268d5b6 100644 (file)
@@ -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.  */