* xterm.c (x_term_init): Don't call x_session_initialize if running
as a daemon.
Fixes: debbugs:18375
+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.
/* 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. */
#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