X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.h;h=6a30af6ad6383f3c1e8a9a21252b811f75525fc4;hb=ffbcd9c99074239f1edd1a7d9a9a6c816ff893d8;hp=c5a5d336e3a9ec22890339bda648ad7c072cea1e;hpb=f7f20a0b3ecbb0e1a2eb59f95b50f0625b37c671;p=nssm.git diff --git a/service.h b/service.h index c5a5d33..6a30af6 100644 --- a/service.h +++ b/service.h @@ -94,17 +94,25 @@ typedef struct { HANDLE process_handle; unsigned long pid; HANDLE wait_handle; + unsigned long exitcode; bool stopping; bool allow_restart; unsigned long throttle; CRITICAL_SECTION throttle_section; bool throttle_section_initialised; + CRITICAL_SECTION hook_section; + bool hook_section_initialised; CONDITION_VARIABLE throttle_condition; HANDLE throttle_timer; LARGE_INTEGER throttle_duetime; + FILETIME nssm_creation_time; FILETIME creation_time; FILETIME exit_time; TCHAR *initial_env; + unsigned long last_control; + unsigned long start_requested_count; + unsigned long start_count; + unsigned long exit_count; } nssm_service_t; void WINAPI service_main(unsigned long, TCHAR **); @@ -145,6 +153,6 @@ int start_service(nssm_service_t *); int stop_service(nssm_service_t *, unsigned long, bool, bool); void CALLBACK end_service(void *, unsigned char); void throttle_restart(nssm_service_t *); -int await_shutdown(nssm_service_t *, TCHAR *, unsigned long); +int await_single_handle(SERVICE_STATUS_HANDLE, SERVICE_STATUS *, HANDLE, TCHAR *, TCHAR *, unsigned long); #endif