aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2010-10-31 10:40:01 -0400
committerChong Yidong2010-10-31 10:40:01 -0400
commit2699a55464f7b43171c7b0e64d095640904e9e21 (patch)
treed99ebc74b0a108dac964f0fbcd9f9d3592ac5c6f /src
parente6ef5dd9ce13d346c7bbdcd6794b29045b4e0e63 (diff)
parent46eadc7aeedf0fe3944291e2631d8604b38fe25f (diff)
downloademacs-2699a55464f7b43171c7b0e64d095640904e9e21.tar.gz
emacs-2699a55464f7b43171c7b0e64d095640904e9e21.zip
Merge changes from emacs-23 branch
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/dbusbind.c12
-rw-r--r--src/xterm.c69
3 files changed, 57 insertions, 36 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2d46e42e17b..359869027dc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
12010-10-31 Chong Yidong <cyd@stupidchicken.com>
2
3 * xterm.c (x_connection_closed): Print informative error message
4 when aborting on GTK. This requires using shut_down_emacs
5 directly instead of Fkill_emacs.
6
72010-10-31 Michael Albinus <michael.albinus@gmx.de>
8
9 * dbusbind.c (Fdbus_call_method_asynchronously)
10 (Fdbus_register_signal, Fdbus_register_method): Check, whether
11 `dbus-registered-objects-table' is initialized.
12
12010-10-29 Eli Zaretskii <eliz@gnu.org> 132010-10-29 Eli Zaretskii <eliz@gnu.org>
2 14
3 * emacs.c (main): Call syms_of_filelock unconditionally. 15 * emacs.c (main): Call syms_of_filelock unconditionally.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 683b7cb583b..beb1faaf4aa 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1232,6 +1232,10 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
1232 SDATA (interface), 1232 SDATA (interface),
1233 SDATA (method)); 1233 SDATA (method));
1234 1234
1235 /* Check dbus-registered-objects-table. */
1236 if (!HASH_TABLE_P (Vdbus_registered_objects_table))
1237 XD_SIGNAL1 (build_string ("dbus.el is not loaded"));
1238
1235 /* Open a connection to the bus. */ 1239 /* Open a connection to the bus. */
1236 connection = xd_initialize (bus, TRUE); 1240 connection = xd_initialize (bus, TRUE);
1237 1241
@@ -1869,6 +1873,10 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG
1869 wrong_type_argument (intern ("functionp"), handler); 1873 wrong_type_argument (intern ("functionp"), handler);
1870 GCPRO6 (bus, service, path, interface, signal, handler); 1874 GCPRO6 (bus, service, path, interface, signal, handler);
1871 1875
1876 /* Check dbus-registered-objects-table. */
1877 if (!HASH_TABLE_P (Vdbus_registered_objects_table))
1878 XD_SIGNAL1 (build_string ("dbus.el is not loaded"));
1879
1872 /* Retrieve unique name of service. If service is a known name, we 1880 /* Retrieve unique name of service. If service is a known name, we
1873 will register for the corresponding unique name, if any. Signals 1881 will register for the corresponding unique name, if any. Signals
1874 are sent always with the unique name as sender. Note: the unique 1882 are sent always with the unique name as sender. Note: the unique
@@ -1981,6 +1989,10 @@ used for composing the returning D-Bus message. */)
1981 /* TODO: We must check for a valid service name, otherwise there is 1989 /* TODO: We must check for a valid service name, otherwise there is
1982 a segmentation fault. */ 1990 a segmentation fault. */
1983 1991
1992 /* Check dbus-registered-objects-table. */
1993 if (!HASH_TABLE_P (Vdbus_registered_objects_table))
1994 XD_SIGNAL1 (build_string ("dbus.el is not loaded"));
1995
1984 /* Open a connection to the bus. */ 1996 /* Open a connection to the bus. */
1985 connection = xd_initialize (bus, TRUE); 1997 connection = xd_initialize (bus, TRUE);
1986 1998
diff --git a/src/xterm.c b/src/xterm.c
index 401b3ecfa4e..c7f7d036f9f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7670,47 +7670,44 @@ x_connection_closed (Display *dpy, const char *error_message)
7670 delete_frame (frame, Qnoelisp); 7670 delete_frame (frame, Qnoelisp);
7671 } 7671 }
7672 7672
7673 /* We have to close the display to inform Xt that it doesn't 7673 /* If DPYINFO is null, this means we didn't open the display in the
7674 exist anymore. If we don't, Xt will continue to wait for 7674 first place, so don't try to close it. */
7675 events from the display. As a consequence, a sequence of
7676
7677 M-x make-frame-on-display RET :1 RET
7678 ...kill the new frame, so that we get an IO error...
7679 M-x make-frame-on-display RET :1 RET
7680
7681 will indefinitely wait in Xt for events for display `:1', opened
7682 in the first call to make-frame-on-display.
7683
7684 Closing the display is reported to lead to a bus error on
7685 OpenWindows in certain situations. I suspect that is a bug
7686 in OpenWindows. I don't know how to circumvent it here. */
7687
7688 if (dpyinfo) 7675 if (dpyinfo)
7689 { 7676 {
7690#ifdef USE_X_TOOLKIT 7677#ifdef USE_X_TOOLKIT
7691 /* If DPYINFO is null, this means we didn't open the display 7678 /* We have to close the display to inform Xt that it doesn't
7692 in the first place, so don't try to close it. */ 7679 exist anymore. If we don't, Xt will continue to wait for
7693 { 7680 events from the display. As a consequence, a sequence of
7694 fatal_error_signal_hook = x_fatal_error_signal; 7681
7695 XtCloseDisplay (dpy); 7682 M-x make-frame-on-display RET :1 RET
7696 fatal_error_signal_hook = NULL; 7683 ...kill the new frame, so that we get an IO error...
7697 } 7684 M-x make-frame-on-display RET :1 RET
7698#endif 7685
7686 will indefinitely wait in Xt for events for display `:1',
7687 opened in the first call to make-frame-on-display.
7688
7689 Closing the display is reported to lead to a bus error on
7690 OpenWindows in certain situations. I suspect that is a bug
7691 in OpenWindows. I don't know how to circumvent it here. */
7692 extern void (*fatal_error_signal_hook) P_ ((void));
7693 fatal_error_signal_hook = x_fatal_error_signal;
7694 XtCloseDisplay (dpy);
7695 fatal_error_signal_hook = NULL;
7696#endif /* USE_X_TOOLKIT */
7699 7697
7700#ifdef USE_GTK 7698#ifdef USE_GTK
7701 /* There is a long-standing bug in GTK that prevents the GTK 7699 /* A long-standing GTK bug prevents proper disconnect handling
7702 main loop from recovering gracefully from disconnects 7700 (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once,
7703 (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Among 7701 the resulting Glib error message loop filled a user's disk.
7704 other problems, this gives rise to a stream of Glib error 7702 To avoid this, kill Emacs unconditionally on disconnect. */
7705 messages that, in one incident, filled up a user's hard disk 7703 shut_down_emacs (0, 0, Qnil);
7706 (http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00927.html). 7704 fprintf (stderr, "%s\n\
7707 So, kill Emacs unconditionally if the display is closed. */ 7705When compiled with GTK, Emacs cannot recover from X disconnects.\n\
7708 { 7706This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\
7709 fprintf (stderr, "%s\n", error_msg); 7707For details, see etc/PROBLEMS.\n",
7710 Fkill_emacs (make_number (70)); 7708 error_msg);
7711 abort (); /* NOTREACHED */ 7709 abort ();
7712 } 7710#endif /* USE_GTK */
7713#endif
7714 7711
7715 /* Indicate that this display is dead. */ 7712 /* Indicate that this display is dead. */
7716 dpyinfo->display = 0; 7713 dpyinfo->display = 0;