diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-21 23:46:04 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-21 23:46:04 +0100 |
commit | a091370e612b79452ac882e299d0e85154a64b59 (patch) | |
tree | e3af7375e90955609424ebe19442ddb3d53d6e09 /src/common.h | |
parent | Remove dependency on libsimple since it's not portable (diff) | |
download | redshift-ng-a091370e612b79452ac882e299d0e85154a64b59.tar.gz redshift-ng-a091370e612b79452ac882e299d0e85154a64b59.tar.bz2 redshift-ng-a091370e612b79452ac882e299d0e85154a64b59.tar.xz |
misc stuff
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h index aa9af94..b50bb6a 100644 --- a/src/common.h +++ b/src/common.h @@ -368,6 +368,11 @@ enum program_mode { PROGRAM_MODE_ONE_SHOT, /** + * Update temperature once and reset when killed + */ + PROGRAM_MODE_UNTIL_DEATH, + + /** * Print setting and exit */ PROGRAM_MODE_PRINT, @@ -632,8 +637,8 @@ struct setting_time { }; struct settings { - /* Path to config file */ const char *config_file; + int until_death; struct config_ini_state config; @@ -1103,6 +1108,22 @@ void run_period_change_hooks(enum period prev_period, enum period period); */ void install_signal_handlers(void); +/** + * Install signal handlers for forcefully terminating + * the process + * + * This is useful if slave thread is blocked + * + * SIGINT, SIGTERM, and SIGQUIT are set to at the + * first arrival arm a SIGARLM timer with a short + * expiration time, and on the second arrival + * immediately terminate the process. SIGARLM is + * set to immediately terminate the process. + */ +#ifndef WINDOWS +void install_forceful_exit_signal_handlers(void); +#endif + /* util.c */ |