X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=process.h;h=1bfc273db83b4aca504f5e1d70e2826a3962b463;hb=3c9d8f85d38b4c97b83e2baca63211a4008b5e0d;hp=95f87b2c4815d5b20e7e0a156e0f0ed60d61383f;hpb=8d8036e4f1be4ba52898170345a9f8be0f327238;p=nssm.git diff --git a/process.h b/process.h index 95f87b2..1bfc273 100644 --- a/process.h +++ b/process.h @@ -1,8 +1,36 @@ -#ifndef PROCESS_H -#define PROCESS_H - -#include - -void kill_process_tree(char *, unsigned long, unsigned long, unsigned long); - -#endif +#ifndef PROCESS_H +#define PROCESS_H + +#include + +typedef struct { + TCHAR *name; + HANDLE process_handle; + 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; + +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 *); +void kill_process_tree(nssm_service_t *, kill_t *, unsigned long); +void kill_process_tree(kill_t *, unsigned long); + +#endif