bool inherit_handles = false;\r
if (si.dwFlags & STARTF_USESTDHANDLES) inherit_handles = true;\r
unsigned long flags = service->priority & priority_mask();\r
- if (service->stdin_pipe) flags |= DETACHED_PROCESS;\r
if (service->affinity) flags |= CREATE_SUSPENDED;\r
if (! CreateProcess(0, cmd, 0, 0, inherit_handles, flags, 0, service->dir, &si, &pi)) {\r
unsigned long exitcode = 3;\r
UnregisterWait(service->wait_handle);\r
service->wait_handle = 0;\r
}\r
- if (service->stdin_pipe) {\r
- CloseHandle(service->stdin_pipe);\r
- service->stdin_pipe = 0;\r
- }\r
\r
service->rotate_stdout_online = service->rotate_stderr_online = NSSM_ROTATE_OFFLINE;\r
\r
if (service->pid) kill_process_tree(service, service->pid, exitcode, service->pid);\r
service->pid = 0;\r
\r
+ if (! service->no_console) FreeConsole();\r
+\r
/*\r
The why argument is true if our wait timed out or false otherwise.\r
Our wait is infinite so why will never be true when called by the system.\r