Skip to content

Commit cc97012

Browse files
committed
Catch SIGQUIT
This resets automatic fan control.
1 parent f1bdb61 commit cc97012

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/daemon.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ void signal_handler(int signal)
118118
syslog(LOG_WARNING, "Received SIGTERM signal.");
119119
cleanup_and_exit(EXIT_SUCCESS);
120120

121+
case SIGQUIT:
122+
syslog(LOG_WARNING, "Received SIGQUIT signal.");
123+
cleanup_and_exit(EXIT_SUCCESS);
124+
121125
case SIGINT:
122126
syslog(LOG_WARNING, "Received SIGINT signal.");
123127
cleanup_and_exit(EXIT_SUCCESS);
@@ -134,6 +138,7 @@ void go_daemon(void (*fan_control)())
134138
// Setup signal handling before we start
135139
signal(SIGHUP, signal_handler);
136140
signal(SIGTERM, signal_handler);
141+
signal(SIGQUIT, signal_handler);
137142
signal(SIGINT, signal_handler);
138143

139144
syslog(LOG_INFO, "%s starting up", PROGRAM_NAME);

0 commit comments

Comments
 (0)