From 1de510f46f72716ba4e1c02c3fed1de074772438 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 23 Oct 2018 11:09:38 +0530 Subject: [PATCH] poll at zero timeout as well --- kitty/child-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 925ec9d7e..49f1a7450 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -1007,7 +1007,7 @@ io_loop(void *data) { if (has_pending_wakeups) { now = monotonic(); double time_delta = OPT(input_delay) - (now - last_main_loop_wakeup_at); - if (time_delta > 0) ret = poll(fds, self->count + EXTRA_FDS, time_delta); + if (time_delta >= 0) ret = poll(fds, self->count + EXTRA_FDS, time_delta); else ret = 0; } else { ret = poll(fds, self->count + EXTRA_FDS, -1);