Commit 66f55a9d authored by Jim Blandy's avatar Jim Blandy
Browse files

* xterm.c (XTread_socket): Initialize event_found to zero, and

	pass a zeroed timeout to select, not a null pointer; the latter
	means "wait forever".
parent 82d04750
...@@ -2575,7 +2575,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) ...@@ -2575,7 +2575,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
int items_pending; /* How many items are in the X queue. */ int items_pending; /* How many items are in the X queue. */
XEvent event; XEvent event;
struct frame *f; struct frame *f;
int event_found; int event_found = 0;
int prefix; int prefix;
Lisp_Object part; Lisp_Object part;
...@@ -3297,10 +3297,11 @@ XTread_socket (sd, bufp, numchars, waitp, expected) ...@@ -3297,10 +3297,11 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
Act as if there had been a hangup. */ Act as if there had been a hangup. */
int fd = ConnectionNumber (x_current_display); int fd = ConnectionNumber (x_current_display);
SELECT_TYPE mask; SELECT_TYPE mask;
EMACS_TIME timeout;
FD_SET(fd, &mask); FD_SET(fd, &mask);
if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, EMACS_SET_SECS_USECS (timeout, 0, 0);
(EMACS_TIME *) 0) if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout)
&& !XStuffPending ()) && !XStuffPending ())
kill (getpid (), SIGHUP); kill (getpid (), SIGHUP);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment