Skip to content

Commit

Permalink
ttyplot.c: Get signal handling delay below 300ms for Ctrl+C
Browse files Browse the repository at this point in the history
This is related to signal starvation with high pressure in stdin.
See the commit just before for more context.
  • Loading branch information
hartwork committed Nov 28, 2023
1 parent 073def1 commit dc29a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ttyplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit dc29a6e

Please sign in to comment.