Subject: bug#1040: 23.0.60; emacs --daemon opens X11 connection

From: Markus Triska <[email-masked]>
Date: Sat, 27 Sep 2008 23:31:55 +0200 (CEST)

When I log in via "ssh -X -Y -v <host>" to a remote host and do:

   $emacs --daemon

then the daemon seems to open an X11 connection:

   debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
   debug1: client_request_x11: request from 127.0.0.1 55586
   debug1: channel 1: new [x11]
   debug1: confirm x11
   debug1: channel 1: FORCE input drain
   debug1: channel 1: free: x11, nchannels 2
   debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
   debug1: client_request_x11: request from 127.0.0.1 55587
   debug1: channel 1: new [x11]
   debug1: confirm x11
   debug1: channel 1: FORCE input drain
   debug1: channel 1: free: x11, nchannels 2
   debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
   debug1: client_request_x11: request from 127.0.0.1 55588
   debug1: channel 1: new [x11]
   debug1: confirm x11

When I then try to log out (with C-d), the connection hangs until I
press C-c, which kills the Emacs daemon. I think the daemon should not
open an X11 connection by itself, and thus survive in cases like this.

In GNU Emacs 23.0.60.1 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
 of 2008-09-24 on mt-computer.local
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t