From 15ffd0b38e02a96250116e2f06c54ee685391031 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Thu, 21 Dec 1995 17:16:13 +0000 Subject: [PATCH] (x_connection_signal): Set an alarm around XNoOp call. --- src/xterm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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, */ { x_connection_signal_dpyinfo = x_display_list; + stop_polling (); sigunblock (SIGPIPE); while (x_connection_signal_dpyinfo) { signal (SIGPIPE, x_connection_signal_1); - + signal (SIGALRM, x_connection_signal_1); + + /* According to Jim Campbell , + On Solaris 2.4, XNoOp can hang when the connection + has already died. Since XNoOp should not wait, + let's assume that if it hangs for 3 seconds + that means the connection is dead. + This is a kludge, but I don't see any other way that works. */ + alarm (3); XNoOp (x_connection_signal_dpyinfo->display); + alarm (0); + XSync (x_connection_signal_dpyinfo->display, False); /* Each time we get here, cycle through the displays now open. */ -- 2.39.2