Mercurial > emacs
comparison src/xterm.c @ 5953:60f711724bc9
(XTread_socket): Do not assume that select returning
immediately with no events implies a hangup.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 15 Feb 1994 16:17:25 +0000 |
parents | 4e827db2523a |
children | fdb3959bbaf7 |
comparison
equal
deleted
inserted
replaced
5952:908e36c0235d | 5953:60f711724bc9 |
---|---|
3626 } | 3626 } |
3627 | 3627 |
3628 #ifdef X_IO_BUG | 3628 #ifdef X_IO_BUG |
3629 if (! event_found) | 3629 if (! event_found) |
3630 /* On some systems, an X bug causes Emacs to get no more events | 3630 /* On some systems, an X bug causes Emacs to get no more events |
3631 when the window is destroyed. Detect that. */ | 3631 when the window is destroyed. Detect that. (1994.) */ |
3632 XNoOp (x_current_display); | 3632 XNoOp (x_current_display); |
3633 #endif /* X_IO_BUG */ | 3633 #endif /* X_IO_BUG */ |
3634 | 3634 |
3635 #if 0 /* This fails for serial-line connections to the X server, | |
3636 because the characters arrive one by one, and a partial | |
3637 command makes select return but gives nothing to read. | |
3638 We'll have to hope that the bug that this tried to fix | |
3639 in 1988 has been fixed in Xlib or the X server. */ | |
3635 #ifdef HAVE_SELECT | 3640 #ifdef HAVE_SELECT |
3636 if (expected && ! event_found) | 3641 if (expected && ! event_found) |
3637 { | 3642 { |
3638 /* AOJ 880406: if select returns true but XPending doesn't, it means that | 3643 /* AOJ 880406: if select returns true but XPending doesn't, it means that |
3639 there is an EOF condition; in other words, that X has died. | 3644 there is an EOF condition; in other words, that X has died. |
3650 if (0 != select (fd + 1, &mask, &junk1, &junk2, &timeout) | 3655 if (0 != select (fd + 1, &mask, &junk1, &junk2, &timeout) |
3651 && !XStuffPending ()) | 3656 && !XStuffPending ()) |
3652 kill (getpid (), SIGHUP); | 3657 kill (getpid (), SIGHUP); |
3653 } | 3658 } |
3654 #endif /* HAVE_SELECT */ | 3659 #endif /* HAVE_SELECT */ |
3660 #endif /* 0 */ | |
3655 | 3661 |
3656 #ifndef HAVE_X11 | 3662 #ifndef HAVE_X11 |
3657 if (updating_frame == 0) | 3663 if (updating_frame == 0) |
3658 x_do_pending_expose (); | 3664 x_do_pending_expose (); |
3659 #endif | 3665 #endif |