X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.cpp;h=937a2ece4150ffae88f74c3f844858db7d1998d7;hb=cc956aacde93d93f5810ca4c0df7775d1bfe3458;hp=336cf27dcef16edb336fa70281d0203bb71c1881;hpb=fb754aaeeb24a7dcfdfb7b905ad5073b32bbe5ae;p=nssm.git diff --git a/service.cpp b/service.cpp index 336cf27..937a2ec 100644 --- a/service.cpp +++ b/service.cpp @@ -2060,6 +2060,9 @@ void CALLBACK end_service(void *arg, unsigned char why) { service->exit_count++; (void) nssm_hook(&hook_threads, service, NSSM_HOOK_EVENT_EXIT, NSSM_HOOK_ACTION_POST, NULL, NSSM_HOOK_DEADLINE, true); + /* Exit logging threads. */ + cleanup_loggers(service); + /* The why argument is true if our wait timed out or false otherwise. Our wait is infinite so why will never be true when called by the system. @@ -2110,7 +2113,6 @@ void CALLBACK end_service(void *arg, unsigned char why) { log_event(EVENTLOG_INFORMATION_TYPE, NSSM_EVENT_EXIT_UNCLEAN, service->name, code, exit_action_strings[action], 0); stop_service(service, exitcode, false, default_action); wait_for_hooks(service, false); - free_imports(); nssm_exit(exitcode); } }