From a29a578b3289db3b831ff3edbb5f3221dc4ba306 Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Thu, 7 Jan 2010 20:12:38 +0100 Subject: Handle both INT and TERM signals as exit signals. --- src/redshift.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/redshift.c') 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; -- cgit v1.2.3-70-g09d2