diff options
| author | Richard M. Stallman | 1993-12-26 07:08:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-12-26 07:08:08 +0000 |
| commit | 307feb1fd5a119fd65fcee84f33e89aa8df4d439 (patch) | |
| tree | f1fed77eb6e0581f337b62f8613423f85120c5b6 /src | |
| parent | 6d1e5a964ef5afbf2e6581ca798955c0d7dc10f3 (diff) | |
| download | emacs-307feb1fd5a119fd65fcee84f33e89aa8df4d439.tar.gz emacs-307feb1fd5a119fd65fcee84f33e89aa8df4d439.zip | |
(XTread_socket): Make proper junk values to pass to select.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 6 |
1 files 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) | |||
| 3448 | there is an EOF condition; in other words, that X has died. | 3448 | there is an EOF condition; in other words, that X has died. |
| 3449 | Act as if there had been a hangup. */ | 3449 | Act as if there had been a hangup. */ |
| 3450 | int fd = ConnectionNumber (x_current_display); | 3450 | int fd = ConnectionNumber (x_current_display); |
| 3451 | SELECT_TYPE mask; | 3451 | SELECT_TYPE mask, junk1, junk2; |
| 3452 | EMACS_TIME timeout; | 3452 | EMACS_TIME timeout; |
| 3453 | 3453 | ||
| 3454 | FD_ZERO (&mask); | 3454 | FD_ZERO (&mask); |
| 3455 | FD_SET (fd, &mask); | 3455 | FD_SET (fd, &mask); |
| 3456 | EMACS_SET_SECS_USECS (timeout, 0, 0); | 3456 | EMACS_SET_SECS_USECS (timeout, 0, 0); |
| 3457 | if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout) | 3457 | FD_ZERO (&junk1); |
| 3458 | FD_ZERO (&junk2); | ||
| 3459 | if (0 != select (fd + 1, &mask, &junk1, &junk2, &timeout) | ||
| 3458 | && !XStuffPending ()) | 3460 | && !XStuffPending ()) |
| 3459 | kill (getpid (), SIGHUP); | 3461 | kill (getpid (), SIGHUP); |
| 3460 | } | 3462 | } |