GNU bug report logs -
#20978
25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes
Previous Next
Reported by: Ian Kelling <ian <at> iankelling.org>
Date: Sat, 4 Jul 2015 12:35:02 UTC
Severity: normal
Tags: patch
Found in version 25.0.50
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* src/process.c (wait_reading_process_output): Extend the behavior of
not breaking due to not finding output when a timer has lowered the
timeout to include when SIGIO lowers the timeout.
diff --git a/src/process.c b/src/process.c
index 052f94e..f64a064 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4967,12 +4967,17 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
if (nfds == 0)
{
+ /* If we've past the requested timeout, or got some output
+ and aren't skipping processes, and haven't lowered our
+ timeout due to timers or SIGIO, or have waited a long
+ amount of time due to repeated timers */
struct timespec now = current_timespec ();
- if ((timeout.tv_sec == 0 && timeout.tv_nsec == 0)
+ if (wait == MINIMUM
|| (wait == TIMEOUT && timespec_cmp (end_time, now) <= 0)
|| (!process_skipped && got_some_output > 0
&& (!timespec_valid_p (got_output_end_time)
- || timespec_cmp (got_output_end_time, now) <= 0)))
+ || timespec_cmp (got_output_end_time, now) <= 0)
+ && (timeout.tv_sec > 0 || timeout.tv_nsec > 0)))
break;
}
--
2.4.5
This bug report was last modified 9 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.