aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1995-12-21 17:16:13 +0000
committerKarl Heuer1995-12-21 17:16:13 +0000
commit15ffd0b38e02a96250116e2f06c54ee685391031 (patch)
treef3d7e1b9af8a43fa03c5714a295a027f72cc8e3e /src
parent271d6c1c27da70780ac5fa01a0e43d62bb884435 (diff)
downloademacs-15ffd0b38e02a96250116e2f06c54ee685391031.tar.gz
emacs-15ffd0b38e02a96250116e2f06c54ee685391031.zip
(x_connection_signal): Set an alarm around XNoOp call.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index c2e1e56d76c..6002f9cecc7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4650,13 +4650,24 @@ x_connection_signal (signalnum) /* If we don't have an argument, */
4650{ 4650{
4651 x_connection_signal_dpyinfo = x_display_list; 4651 x_connection_signal_dpyinfo = x_display_list;
4652 4652
4653 stop_polling ();
4653 sigunblock (SIGPIPE); 4654 sigunblock (SIGPIPE);
4654 4655
4655 while (x_connection_signal_dpyinfo) 4656 while (x_connection_signal_dpyinfo)
4656 { 4657 {
4657 signal (SIGPIPE, x_connection_signal_1); 4658 signal (SIGPIPE, x_connection_signal_1);
4658 4659 signal (SIGALRM, x_connection_signal_1);
4660
4661 /* According to Jim Campbell <jec@murzim.ca.boeing.com>,
4662 On Solaris 2.4, XNoOp can hang when the connection
4663 has already died. Since XNoOp should not wait,
4664 let's assume that if it hangs for 3 seconds
4665 that means the connection is dead.
4666 This is a kludge, but I don't see any other way that works. */
4667 alarm (3);
4659 XNoOp (x_connection_signal_dpyinfo->display); 4668 XNoOp (x_connection_signal_dpyinfo->display);
4669 alarm (0);
4670
4660 XSync (x_connection_signal_dpyinfo->display, False); 4671 XSync (x_connection_signal_dpyinfo->display, False);
4661 4672
4662 /* Each time we get here, cycle through the displays now open. */ 4673 /* Each time we get here, cycle through the displays now open. */