aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/redshift.c')
-rw-r--r--src/redshift.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/redshift.c b/src/redshift.c
index 75e0d9c..e924d61 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -434,7 +434,7 @@ main(int argc, char *argv[])
float adjustment_alpha = 0.0;
- /* Install signal handler for SIGINT */
+ /* Install signal handler for INT and TERM signals */
struct sigaction sigact;
sigset_t sigset;
@@ -443,6 +443,7 @@ main(int argc, char *argv[])
sigact.sa_mask = sigset;
sigact.sa_flags = 0;
sigaction(SIGINT, &sigact, NULL);
+ sigaction(SIGTERM, &sigact, NULL);
/* Continously adjust color temperature */
int done = 0;