X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/704c0cbcef60a8cbe5bbd6d4bf90e00cc39b285e..56e5b2db28757ed9b09f15c66e5b13eae241d4e6:/unix/uxplink.c diff --git a/unix/uxplink.c b/unix/uxplink.c index 453a9f41..dab69475 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -532,12 +532,17 @@ int main(int argc, char **argv) for (i = 0; i < skcount; i++) { socket = sklist[i]; + /* + * We must process exceptional notifications before + * ordinary readability ones, or we may go straight + * past the urgent marker. + */ + if (FD_ISSET(socket, &xset)) + select_result(socket, 4); if (FD_ISSET(socket, &rset)) select_result(socket, 1); if (FD_ISSET(socket, &wset)) select_result(socket, 2); - if (FD_ISSET(socket, &xset)) - select_result(socket, 4); } if (FD_ISSET(0, &rset)) {