* src/process.c (wait_reading_process_output) [!USABLE_SIGIO]: If
we're waiting for input, don't use a timeout of more than 25 msec
in the call to select. (Bug#50043)
timeout = make_timespec (0, 0);
#endif
+#ifndef USABLE_SIGIO
+ /* If we're polling for input, don't get stuck in select for
+ more than 25 msec. */
+ struct timespec short_timeout = make_timespec (0, 25000000);
+ if ((read_kbd || !NILP (wait_for_cell))
+ && timespec_cmp (short_timeout, timeout) < 0)
+ timeout = short_timeout;
+#endif
+
/* Non-macOS HAVE_GLIB builds call thread_select in xgselect.c. */
#if defined HAVE_GLIB && !defined HAVE_NS
nfds = xg_select (max_desc + 1,