Add signal exit handler for SIGQUIT
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.
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'.
Thanks for the info, I didn't know about it. And yet, why not use a graceful exit on SIGQUIT instead of a hard?