X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.cpp;h=e8a1569c7d75bc7514fb35269954f25fd0488500;hb=c03d51cbbfe9f4f8a28dbabbfc068573a1842b74;hp=284b5ec206b0f0a31c00a8a51fbcc6cdf4805205;hpb=54438652fac1f4f8dc6120bbfa8aac766aa656d3;p=nssm.git diff --git a/service.cpp b/service.cpp index 284b5ec..e8a1569 100644 --- a/service.cpp +++ b/service.cpp @@ -1697,6 +1697,8 @@ void CALLBACK end_service(void *arg, unsigned char why) { if (service->pid) kill_process_tree(service, service->pid, exitcode, service->pid); service->pid = 0; + if (! service->no_console) FreeConsole(); + /* 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.