emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src xterm.c


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] emacs/src xterm.c
Date: Mon, 15 Jun 2009 10:49:59 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     YAMAMOTO Mitsuharu <mituharu>   09/06/15 10:49:59

Modified files:
        src            : xterm.c 

Log message:
        (x_delete_terminal): Put previous change in #if 0 and
        add comment explaining why.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xterm.c?cvsroot=emacs&r1=1.1027&r2=1.1028

Patches:
Index: xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.1027
retrieving revision 1.1028
diff -u -b -r1.1027 -r1.1028
--- xterm.c     11 Jun 2009 01:24:20 -0000      1.1027
+++ xterm.c     15 Jun 2009 10:49:59 -0000      1.1028
@@ -10747,7 +10747,18 @@
       /* Whether or not XCloseDisplay destroys the associated resource
         database depends on the version of libX11.  To avoid both
         crash and memory leak, we dissociate the database from the
-        display and then destroy dpyinfo->xrdb ourselves.  */
+        display and then destroy dpyinfo->xrdb ourselves.
+
+        Unfortunately, the above strategy does not work in some
+        situations due to a bug in newer versions of libX11: because
+        XrmSetDatabase doesn't clear the flag XlibDisplayDfltRMDB if
+        dpy->db is NULL, XCloseDisplay destroys the associated
+        database whereas it has not been created by XGetDefault
+        (Bug#21974 in freedesktop.org Bugzilla).  As a workaround, we
+        don't destroy the database here in order to avoid the crash
+        in the above situations for now, though that may cause memory
+        leaks in other situations.  */
+#if 0
 #ifdef HAVE_XRMSETDATABASE
       XrmSetDatabase (dpyinfo->display, NULL);
 #else
@@ -10757,6 +10768,7 @@
         some older versions of libX11 crash if we call it after
         closing all the displays.  */
       XrmDestroyDatabase (dpyinfo->xrdb);
+#endif
 
 #ifdef USE_GTK
       xg_display_close (dpyinfo->display);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]