Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signal exit handler for SIGQUIT #824

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webkadiz
Copy link

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.

@CameronNemo
Copy link
Contributor

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'.

@webkadiz
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants