changeset 2208:10b84f28f6f2

[SIGIO] (UNBLOCK_INPUT): Resignal if x_pending_input.
author Richard M. Stallman <rms@gnu.org>
date Tue, 16 Mar 1993 05:54:56 +0000
parents d3eca6fffc5c
children 7b95f29936cb
files src/xterm.h
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.h	Mon Mar 15 21:41:36 1993 +0000
+++ b/src/xterm.h	Tue Mar 16 05:54:56 1993 +0000
@@ -180,8 +180,16 @@
 #define BLOCK_INPUT (x_input_blocked++)
 
 /* End critical section. */
+#ifdef SIGIO
+/* If doing interrupt input, and an interrupt came in when input was blocked,
+   reinvoke the interrupt handler now to deal with it.  */
+#define UNBLOCK_INPUT \
+  ((x_input_blocked--, (x_input_blocked < 0 ? (abort (), 0) : 0)),	\
+   (x_input_blocked == 0 && x_pending_input != 0 ? (kill (0, SIGIO), 0) : 0))
+#else
 #define UNBLOCK_INPUT \
   (x_input_blocked--, (x_input_blocked < 0 ? (abort (), 0) : 0))
+#endif
 
 #define TOTALLY_UNBLOCK_INPUT (x_input_blocked = 0)
 #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT