From dc29a6e96b60f897d41580c7df9a13a3e2047d38 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 28 Nov 2023 16:56:57 +0100 Subject: [PATCH] ttyplot.c: Get signal handling delay below 300ms for Ctrl+C This is related to signal starvation with high pressure in stdin. See the commit just before for more context. --- ttyplot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttyplot.c b/ttyplot.c index 5793722..cf0e25b 100644 --- a/ttyplot.c +++ b/ttyplot.c @@ -499,7 +499,7 @@ int main(int argc, char *argv[]) { if (previous_parse_succeeded) { timeout.tv_nsec = 0; // we may have more input pressing, let's not throttle it down } else { - timeout.tv_nsec = 500 * 1000 * 1000; // <=500 milliseconds for a healthy clock display + timeout.tv_nsec = 200 * 1000 * 1000; // <=500 milliseconds for a healthy clock display } const int select_ret = pselect(select_nfds, &read_fds, NULL, NULL, &timeout, &empty_sigset);