X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=process.h;h=3b4aab92ee6ccfa9e4b69e0882f2f945b1e80c11;hb=d1c0d356f6ea58980a33f2fa2da1b6971dd9f909;hp=3489f547b755086a1ea4737057e45010aff43672;hpb=e3b93d0c37ae200fa0375e4be6f435008050b385;p=nssm.git diff --git a/process.h b/process.h index 3489f54..3b4aab9 100644 --- a/process.h +++ b/process.h @@ -1,21 +1,43 @@ -#ifndef PROCESS_H -#define PROCESS_H - -#include - -typedef struct { - unsigned long pid; - unsigned long exitcode; - int signalled; -} kill_t; - -int get_process_creation_time(HANDLE, FILETIME *); -int get_process_exit_time(HANDLE, FILETIME *); -int check_parent(TCHAR *, PROCESSENTRY32 *, unsigned long, FILETIME *, FILETIME *); -int CALLBACK kill_window(HWND, LPARAM); -int kill_threads(nssm_service_t *, kill_t *); -int kill_console(nssm_service_t *); -int kill_process(nssm_service_t *, HANDLE, unsigned long, unsigned long); -void kill_process_tree(nssm_service_t *, unsigned long, unsigned long, unsigned long); - -#endif +#ifndef PROCESS_H +#define PROCESS_H + +#include +#include + +typedef struct { + TCHAR *name; + HANDLE process_handle; + unsigned long depth; + unsigned long pid; + unsigned long exitcode; + unsigned long stop_method; + unsigned long kill_console_delay; + unsigned long kill_window_delay; + unsigned long kill_threads_delay; + SERVICE_STATUS_HANDLE status_handle; + SERVICE_STATUS *status; + FILETIME creation_time; + FILETIME exit_time; + int signalled; +} kill_t; + +typedef int (*walk_function_t)(nssm_service_t *, kill_t *); + +HANDLE get_debug_token(); +void service_kill_t(nssm_service_t *, kill_t *); +int get_process_creation_time(HANDLE, FILETIME *); +int get_process_exit_time(HANDLE, FILETIME *); +int check_parent(kill_t *, PROCESSENTRY32 *, unsigned long); +int CALLBACK kill_window(HWND, LPARAM); +int kill_threads(nssm_service_t *, kill_t *); +int kill_threads(kill_t *); +int kill_console(nssm_service_t *, kill_t *); +int kill_console(kill_t *); +int kill_process(nssm_service_t *, kill_t *); +int kill_process(kill_t *); +int print_process(nssm_service_t *, kill_t *); +int print_process(kill_t *); +void walk_process_tree(nssm_service_t *, walk_function_t, kill_t *, unsigned long); +void kill_process_tree(kill_t *, unsigned long); + +#endif