[Pkg-urxvt-maintainers] Bug#691033: rxvt-unicode: urxvtd dies, if serving clients on multiple X11 servers, if one X11 server is shut down
AR
none at nowhere.org
Sat Oct 20 15:26:01 UTC 2012
Package: rxvt-unicode
Version: 9.15-2
Severity: normal
Tags: patch
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.5.5-01 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages rxvt-unicode depends on:
ii base-passwd 3.5.26
ii libc6 2.13-35
ii libfontconfig1 2.9.0-7
ii libgcc1 1:4.7.1-7
ii libgdk-pixbuf2.0-0 2.26.1-1
ii libglib2.0-0 2.33.12+really2.32.4-2
ii libperl5.14 5.14.2-14
ii libstartup-notification0 0.12-1
ii libx11-6 2:1.5.0-1
ii libxft2 2.3.1-1
ii libxrender1 1:0.9.7-1
ii ncurses-base 5.9-10
Versions of packages rxvt-unicode recommends:
ii fonts-vlgothic [fonts-japanese-gothic] 20120629-1
ii ttf-dejavu 2.33-3
rxvt-unicode suggests no packages.
urxvtd dies, if serving client windows on two or more X servers
(owned by the same user, run on the same machine)
if one of the X servers terminates.
How to reproduce:
1) Start X Session, $DISPLAY=:0 .
start urxvtd in an xterm (to see the exit message).
urxvtd creates a socket: $HOME/.urxvt/urxvtd-<hostname>
Open at least one window using urxvtc
2) Start a second X Session :1
open at least one window using urxvtc
3) Shut down the 2nd X Session :1 while the urxvt window served by
urxvtd is still open.
4) Switch back to X Session :0 and find all urxvtd-served windows
closed and urxvtd gone. The exception handler exit()s if just
one out of many displays is closed. It does not care about other
displays still being active:
int rxvt_xioerror_handler (Display *display)
{
rxvt_warn ("X connection to '%s' broken, unable to recover, exiting.\n",
DisplayString (display));
rxvt_emergency_cleanup ();
_exit (EXIT_FAILURE);
}
A simple remedy:
Use one instance of urxvtd per display by inclusion of
$DISPLAY into the socket name:
urxvtd-<HOSTNAME>-<DISPLAY>
--- rxvt-unicode-9.15_orig/src/rxvtdaemon.C 2012-01-19 14:34:39.000000000 +0100
+++ rxvt-unicode-9.15/src/rxvtdaemon.C 2012-10-16 19:18:17.344715230 +0200
@@ -37,6 +37,7 @@
{
char name[PATH_MAX];
char *path = getenv ("RXVT_SOCKET");
+ char *display = getenv("DISPLAY");
if (!path)
{
@@ -50,9 +51,10 @@
snprintf (name, PATH_MAX, "%s/.urxvt", path);
mkdir (name, 0777);
- snprintf (name, PATH_MAX, "%s/.urxvt/urxvtd-%s",
- path,
- u.nodename);
+ if (!display)
+ snprintf (name, PATH_MAX, "%s/.urxvt/urxvtd-%s", path, u.nodename);
+ else
+ snprintf (name, PATH_MAX, "%s/.urxvt/urxvtd-%s-%s", path, u.nodename, display);
path = name;
}
Though it is possible to serve multiple displays from one daemon I'd
prefer a more conservative approach, i.e. to restrict urxvtd to one
daemon per display.
An accident on display X shall never affect display Y.
Losing dozens of terminals is a downright bad thing.
Regards,
Axel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rxvt-unicode-9.15_urxvtd_socket.diff
Type: text/x-diff
Size: 741 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-urxvt-maintainers/attachments/20121020/70f7c862/attachment-0001.diff>
More information about the Pkg-urxvt-maintainers
mailing list