Mercurial > emacs
changeset 3938:83d870a52936
* 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".
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 30 Jun 1993 21:35:22 +0000 |
parents | adcbf7680a35 |
children | 1b954eb0f249 |
files | src/xterm.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Wed Jun 30 21:30:25 1993 +0000 +++ b/src/xterm.c Wed Jun 30 21:35:22 1993 +0000 @@ -2575,7 +2575,7 @@ int items_pending; /* How many items are in the X queue. */ XEvent event; struct frame *f; - int event_found; + int event_found = 0; int prefix; Lisp_Object part; @@ -3297,10 +3297,11 @@ Act as if there had been a hangup. */ int fd = ConnectionNumber (x_current_display); SELECT_TYPE mask; + EMACS_TIME timeout; FD_SET(fd, &mask); - if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, - (EMACS_TIME *) 0) + EMACS_SET_SECS_USECS (timeout, 0, 0); + if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout) && !XStuffPending ()) kill (getpid (), SIGHUP); }