]> git.eshelyaron.com Git - emacs.git/commit
Fix atimer setting and overdue expiration (bug#55628)
authorMattias Engdegård <mattiase@acm.org>
Mon, 30 May 2022 10:25:19 +0000 (12:25 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 30 May 2022 13:52:02 +0000 (15:52 +0200)
commit169797a3002fae1e86ee799475cd4f1b7ef9a3d1
tree10a3b1f0b2509520dc4839e41f8d112317377f33
parent78e8893f5d4b1c9ca5742fbe20bc5d05a843ed4e
Fix atimer setting and overdue expiration (bug#55628)

* src/atimer.c (set_alarm): If the atimer has already expired, signal
it right away instead of postponing it further.  Previously this could
occur repeatedly, blocking atimers indefinitely.
Also only use `alarm` as fallback if `setitimer` is unavailable, not
both at the same time (which makes no sense, and they both typically
use the same mechanism behind the curtains).

* test/src/eval-tests.el (eval-tests/funcall-with-delayed-message):
New test, verifying proper functioning of funcall-with-delayed-message
which also serves as test for this bug (which also caused
debug-timer-check to fail, but that test is only run when Emacs is
built with enable-checking).
src/atimer.c
test/src/eval-tests.el