diff options
author | Vladislavs Sokurenko <vladislavs.sokurenko@zabbix.com> | 2019-07-01 12:52:36 +0300 |
---|---|---|
committer | Vladislavs Sokurenko <vladislavs.sokurenko@zabbix.com> | 2019-07-01 13:20:15 +0300 |
commit | 7ab46a3b28d18e1ce2225063979d7bed39ef6d32 (patch) | |
tree | de05a42c24a2bb386bd75d1e969d382792caa897 /include/daemon.h | |
parent | c4d9a0a2cfeab7fa9352747d488e7f3c465a3c48 (diff) |
...G...PS. [ZBX-9867] improved Zabbix daemon termination by not using signal unsafe functions in signal handler; improved Zabbix server and Zabbix proxy process termination by stopping data collection and waiting for history syncers to finish
* commit '32c9cd8091f0685282399fea81e095de857f3f89':
.......... [ZBX-9867] added ChangeLog entry
.......... [ZBX-9867] added ChangeLog entry
.......... [ZBX-9867] removed extra new line
.......... [ZBX-9867] removed test code
.......... [ZBX-9867] fixed missing prototype warning and error message
.......PS. [ZBX-9867] added termination of lld manager and lld worker
.......PS. [ZBX-9867] added termination of lld manager and lld worker
.......... [ZBX-9867] merge branch 'feature/ZBX-9867-4.0' into feature/ZBX-9867-4.2
.......... [ZBXNEXT-826] updated release date and version [4.2.4]
(cherry picked from commit 0a8afa02d209b80a71db85c94a2f061184144112)
Diffstat (limited to 'include/daemon.h')
-rw-r--r-- | include/daemon.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/daemon.h b/include/daemon.h index be8ec170c12..8477098fe4a 100644 --- a/include/daemon.h +++ b/include/daemon.h @@ -24,8 +24,8 @@ # error "This module allowed only for Unix OS" #endif -extern char *CONFIG_PID_FILE; - +extern char *CONFIG_PID_FILE; +extern volatile sig_atomic_t sig_exiting; #include "threads.h" int daemon_start(int allow_root, const char *user, unsigned int flags); @@ -34,7 +34,7 @@ void daemon_stop(void); int zbx_sigusr_send(int flags); void zbx_set_sigusr_handler(void (*handler)(int flags)); -#define ZBX_IS_RUNNING() 1 +#define ZBX_IS_RUNNING() (0 == sig_exiting) #define ZBX_DO_EXIT() #define START_MAIN_ZABBIX_ENTRY(allow_root, user, flags) daemon_start(allow_root, user, flags) |