From baff67fcd5d64af9d218204111d2566ae408c967 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 4 Sep 2014 07:38:37 +0200 Subject: [PATCH] * xsmfns.c: Initialize ice_fd. * xterm.c (x_term_init): Don't call x_session_initialize if running as a daemon. Fixes: debbugs:18375 --- src/ChangeLog | 7 +++++++ src/xsmfns.c | 2 +- src/xterm.c | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f463cc71fd8..9b0f435881f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2014-09-04 Jan D + + * 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 Less chatter in 'make' output. diff --git a/src/xsmfns.c b/src/xsmfns.c index 81b012690f9..8721cc81b03 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -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. */ diff --git a/src/xterm.c b/src/xterm.c index beb7d78841d..767de9786cb 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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 -- 2.39.5