aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/keyboard.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 96f0c65165..5eb0597971 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3415,7 +3415,7 @@ get_input_pending (addr)
*addr = !NILP (Vquit_flag) || readable_events ();
}
-/* Interface to read_avail_input, blocking SIGIO if necessary. */
+/* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */
int
gobble_input (expected)
@@ -3432,6 +3432,16 @@ gobble_input (expected)
}
else
#endif
+#ifdef POLL_FOR_INPUT
+ if (read_socket_hook && !interrupt_input && poll_suppress_count == 0)
+ {
+ SIGMASKTYPE mask;
+ mask = sigblockx (SIGALRM);
+ read_avail_input (expected);
+ sigsetmask (mask);
+ }
+ else
+#endif
read_avail_input (expected);
#endif
}