diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-28 14:35:44 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-28 14:35:44 +0000 |
| commit | 8c13594d1bb50b44a708dbd3c0acaa19fa340660 (patch) | |
| tree | fddca3b670cf005baec37c3ce523a3017e301a36 /include | |
| parent | 5268a939d762eb782750151c17a58628cab0e9e8 (diff) | |
- improoved UserParameters for Win32 (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4376 97f52cf1-0a1b-0410-bd0e-c28be96e8082
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 d3b91214..fe43bad9 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 e6fae036..2d9e1cbd 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 982382a0..9d574a17 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); |
