diff options
| author | Jim Blandy | 1993-06-30 21:35:22 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-06-30 21:35:22 +0000 |
| commit | 66f55a9d0cc58190f9521809d6aa37bb7884ddce (patch) | |
| tree | c7ec76b4897e4dfe1d00e66375fc430c10ef78ff | |
| parent | 82d04750c707566019f34b3fd979758b0170b403 (diff) | |
| download | emacs-66f55a9d0cc58190f9521809d6aa37bb7884ddce.tar.gz emacs-66f55a9d0cc58190f9521809d6aa37bb7884ddce.zip | |
* 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".
| -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 | } |