diff options
author | Eugene Grigorjev <git-no-reply@zabbix.com> | 2007-06-28 18:35:44 +0400 |
---|---|---|
committer | Eugene Grigorjev <git-no-reply@zabbix.com> | 2007-06-28 18:35:44 +0400 |
commit | 5f32658e8edda9b7e394001590478ee7f8d1ffcc (patch) | |
tree | 9b01e2aaf88d9d7b6db6384888c6f5ad1c38b04e /include | |
parent | 1a42b2b50626a719a70183fca039d8b47a314ed4 (diff) |
- improoved UserParameters for Win32 (Eugene)
Diffstat (limited to 'include')
-rw-r--r-- | include/alias.h | 1 | ||||
-rw-r--r-- | include/service.h | 10 | ||||
-rw-r--r-- | include/threads.h | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/include/alias.h b/include/alias.h index d3b91214ba0..fe43bad9a7b 100644 --- a/include/alias.h +++ b/include/alias.h @@ -36,5 +36,4 @@ int add_alias_from_config(char *value); void alias_list_free(void); void alias_expand(const char *orig, char *expanded, int exp_buf_len); - #endif /* ZABBIX_ALIAS_H */ diff --git a/include/service.h b/include/service.h index e6fae036f3d..2d9e1cbdeb0 100644 --- a/include/service.h +++ b/include/service.h @@ -38,20 +38,20 @@ int ZabbixRemoveService(void); int ZabbixStartService(void); int ZabbixStopService(void); -#define init_main_process() +void init_main_process(void); /* APPLICATION running status */ /* requred for closing application from service */ -extern int application_is_runned; +int application_status; -#define ZBX_APP_STOPPED 1 +#define ZBX_APP_STOPPED 0 #define ZBX_APP_RUNNED 1 /* ask for running application of closing status */ -#define ZBX_IS_RUNNING (ZBX_APP_RUNNED == application_is_runned) +#define ZBX_IS_RUNNING (ZBX_APP_RUNNED == application_status) /* ask for application closing status */ -#define ZBX_DO_EXIT() (application_is_runned = ZBX_APP_STOPPED) +#define ZBX_DO_EXIT() zbx_error("[%s] [%li]", __FILE__, __LINE__); application_status = ZBX_APP_STOPPED #define START_MAIN_ZABBIX_ENTRY(a) service_start() diff --git a/include/threads.h b/include/threads.h index 982382a0b97..9d574a171d5 100644 --- a/include/threads.h +++ b/include/threads.h @@ -40,6 +40,8 @@ #define zbx_sleep(sec) Sleep(((DWORD)(sec))*((DWORD)1000)) + #define zbx_thread_kill(h) TerminateThread(h, SUCCEED); + #else /* not _WINDOWS */ int zbx_fork(); @@ -60,6 +62,8 @@ #define zbx_sleep(sec) sleep((sec)) + #define zbx_thread_kill(h) kill(h,SIGTERM); + #endif /* _WINDOWS */ ZBX_THREAD_HANDLE zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler), void *args); |