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
#ifdef UNICODE\r
flags |= CREATE_UNICODE_ENVIRONMENT;\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