redshift icon indicating copy to clipboard operation
redshift copied to clipboard

Add signal exit handler for SIGQUIT

Open webkadiz opened this issue 4 years ago • 2 comments

When I call redshift on the command line: $ redshift

My config is being applied and redshift is waiting. If I press Ctrl-C, then redshift exits normally and the configuration is reset If I press Ctrl-\ then redshift just exits and doesn't reset its config, my screen stays red

This PR solves this problem by exposing a handler for the SIGQUIT signal. It sometimes comes in handy when, for example, a person has bind on Ctrl-C, which copies the text.

webkadiz avatar Jun 23 '21 08:06 webkadiz

It sometimes comes in handy when, for example, a person has bind on Ctrl-C, which copies the text.

FYI you can remap the SIGINT binding. E.g. with stty intr '^X'.

CameronNemo avatar Jun 24 '21 04:06 CameronNemo

Thanks for the info, I didn't know about it. And yet, why not use a graceful exit on SIGQUIT instead of a hard?

webkadiz avatar Jun 24 '21 13:06 webkadiz