diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index e4b514c17f4..b24f2f11f5c 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2575,7 +2575,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 2575 | int items_pending; /* How many items are in the X queue. */ | 2575 | int items_pending; /* How many items are in the X queue. */ |
| 2576 | XEvent event; | 2576 | XEvent event; |
| 2577 | struct frame *f; | 2577 | struct frame *f; |
| 2578 | int event_found; | 2578 | int event_found = 0; |
| 2579 | int prefix; | 2579 | int prefix; |
| 2580 | Lisp_Object part; | 2580 | Lisp_Object part; |
| 2581 | 2581 | ||
| @@ -3297,10 +3297,11 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3297 | Act as if there had been a hangup. */ | 3297 | Act as if there had been a hangup. */ |
| 3298 | int fd = ConnectionNumber (x_current_display); | 3298 | int fd = ConnectionNumber (x_current_display); |
| 3299 | SELECT_TYPE mask; | 3299 | SELECT_TYPE mask; |
| 3300 | EMACS_TIME timeout; | ||
| 3300 | 3301 | ||
| 3301 | FD_SET(fd, &mask); | 3302 | FD_SET(fd, &mask); |
| 3302 | if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, | 3303 | EMACS_SET_SECS_USECS (timeout, 0, 0); |
| 3303 | (EMACS_TIME *) 0) | 3304 | if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout) |
| 3304 | && !XStuffPending ()) | 3305 | && !XStuffPending ()) |
| 3305 | kill (getpid (), SIGHUP); | 3306 | kill (getpid (), SIGHUP); |
| 3306 | } | 3307 | } |