# HG changeset patch # User Karl Heuer # Date 819566173 0 # Node ID 52f469edf2164e38906c8d08e2fb31bd9aeeac27 # Parent fc1cf507c51b6eecdc3d23368363affe06bf9b52 (x_connection_signal): Set an alarm around XNoOp call. diff -r fc1cf507c51b -r 52f469edf216 src/xterm.c --- a/src/xterm.c Thu Dec 21 17:15:31 1995 +0000 +++ b/src/xterm.c Thu Dec 21 17:16:13 1995 +0000 @@ -4650,13 +4650,24 @@ { 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. */