aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorPaul Eggert2025-09-27 12:25:34 -0700
committerPaul Eggert2025-09-27 12:26:24 -0700
commit50ab62ad75f939edd72a0aef7262f3f19ebb96dc (patch)
tree55f1b5edce143aff25b0fdd8a4dc2fb89abd4031 /java
parent5e06aa209bc906cf16f2e3de622a189bec34aa78 (diff)
downloademacs-50ab62ad75f939edd72a0aef7262f3f19ebb96dc.tar.gz
emacs-50ab62ad75f939edd72a0aef7262f3f19ebb96dc.zip
Use up-to-date time in wait_reading_process_output
In “Avoid duplicate calls to current_timespec” (2015-07-05) we started caching current_timespec results in NOW. However, this was buggy: we updated NOW only when the timeout was nonzero, but the timeout can be set temporarily to zero in several places in wait_reading_process_output (such as when checking for process status changes), which would cause us to never update NOW and therefore never detect that a timeout happened. Also, this caching was wrong even in principle: since we call Lisp code from wait_reading_process_output, substantial amounts of time can pass, and we can be left using an outdated NOW and incorrectly not time out. Also, nowadays we can use monotonic_coarse_timespec which is fast, and which is better anyway because it’s immune to manual clock changes. Co-authored-by: Spencer Baugh <sbaugh@janestreet.com> * src/process.c (wait_reading_process_output): Stop caching the current realtime. Instead, use the coarse monotonic clock without caching.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions