Allocate a new console for stdin.
[nssm.git] / service.cpp
index ee60c10..284b5ec 100644 (file)
@@ -1530,7 +1530,6 @@ int start_service(nssm_service_t *service) {
   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
@@ -1620,10 +1619,6 @@ int stop_service(nssm_service_t *service, unsigned long exitcode, bool graceful,
     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