X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.cpp;h=53ee349a3fe3c02dcb62f7b7e08d8e62252e22b5;hb=e0f182e26d12875ad2e03f634f5d8eb46f75038b;hp=a86d74400655fd522be9773286aafcfb32eabd89;hpb=e0b8c553770cccef4d8b19396c79129eebf353d4;p=nssm.git diff --git a/service.cpp b/service.cpp index a86d744..53ee349 100644 --- a/service.cpp +++ b/service.cpp @@ -1612,6 +1612,8 @@ int stop_service(nssm_service_t *service, unsigned long exitcode, bool graceful, service->wait_handle = 0; } + service->rotate_stdout_online = service->rotate_stderr_online = NSSM_ROTATE_OFFLINE; + if (default_action && ! exitcode && ! graceful) { log_event(EVENTLOG_INFORMATION_TYPE, NSSM_EVENT_GRACEFUL_SUICIDE, service->name, service->exe, exit_action_strings[NSSM_EXIT_UNCLEAN], exit_action_strings[NSSM_EXIT_UNCLEAN], exit_action_strings[NSSM_EXIT_UNCLEAN], exit_action_strings[NSSM_EXIT_REALLY], 0); graceful = true; @@ -1659,6 +1661,8 @@ void CALLBACK end_service(void *arg, unsigned char why) { service->stopping = true; + service->rotate_stdout_online = service->rotate_stderr_online = NSSM_ROTATE_OFFLINE; + /* Check exit code */ unsigned long exitcode = 0; TCHAR code[16];