From 307feb1fd5a119fd65fcee84f33e89aa8df4d439 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 26 Dec 1993 07:08:08 +0000 Subject: [PATCH] (XTread_socket): Make proper junk values to pass to select. --- src/xterm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 74a16180b73..5df8f37b0d6 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3448,13 +3448,15 @@ XTread_socket (sd, bufp, numchars, waitp, expected) there is an EOF condition; in other words, that X has died. Act as if there had been a hangup. */ int fd = ConnectionNumber (x_current_display); - SELECT_TYPE mask; + SELECT_TYPE mask, junk1, junk2; EMACS_TIME timeout; FD_ZERO (&mask); FD_SET (fd, &mask); EMACS_SET_SECS_USECS (timeout, 0, 0); - if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout) + FD_ZERO (&junk1); + FD_ZERO (&junk2); + if (0 != select (fd + 1, &mask, &junk1, &junk2, &timeout) && !XStuffPending ()) kill (getpid (), SIGHUP); } -- 2.39.5