]> git.eshelyaron.com Git - emacs.git/commitdiff
* xsmfns.c: Initialize ice_fd.
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 4 Sep 2014 05:38:37 +0000 (07:38 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 4 Sep 2014 05:38:37 +0000 (07:38 +0200)
* xterm.c (x_term_init): Don't call x_session_initialize if running
as a daemon.

Fixes: debbugs:18375
src/ChangeLog
src/xsmfns.c
src/xterm.c

index f463cc71fd85500ce8848827e225b3a737eee9cc..9b0f435881ff82c26d9390b0cdd8ac4cd17f549e 100644 (file)
@@ -1,3 +1,10 @@
+2014-09-04  Jan D  <jhd@f20.localdomain>
+
+       * xterm.c (x_term_init): Don't call x_session_initialize if running
+       as a daemon (Bug#18375).
+
+       * xsmfns.c: Initialize ice_fd.
+
 2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        Less chatter in 'make' output.
index 81b012690f993a80a17ccca0309b9f5c207c764c..8721cc81b03f47e7b7e24e7e90594103579a0b41 100644 (file)
@@ -49,7 +49,7 @@ static struct input_event emacs_event;
 
 /* The descriptor that we use to check for data from the session manager.  */
 
-static int ice_fd;
+static int ice_fd = -1;
 
 /* A flag that says if we are in shutdown interactions or not.  */
 
index beb7d78841d76a7e106f4140f746bddb599e721c..767de9786cb426bc0f19688dc05c9a9b9c1bf2c4 100644 (file)
@@ -11183,8 +11183,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 #ifdef HAVE_X_SM
   /* Only do this for the very first display in the Emacs session.
      Ignore X session management when Emacs was first started on a
-     tty.  */
-  if (terminal->id == 1)
+     tty or started as a daemon.  */
+  if (terminal->id == 1 && ! IS_DAEMON)
     x_session_initialize (dpyinfo);
 #endif