Change console inheritance on W32
authorLRN <lrn1986@gmail.com>
Mon, 23 Sep 2013 12:43:04 +0000 (12:43 +0000)
committerLRN <lrn1986@gmail.com>
Mon, 23 Sep 2013 12:43:04 +0000 (12:43 +0000)
This allows std handles to be properly inherited in case when
they are console handles (DETACHED_PROCESS completely forbids
access to the console and overrides anything)

src/util/os_priority.c

index c5bb397c1b08dcbab2677fcca3831873d72e49f0..f019bd605aa29448d9348c3102c349ea80000a3c 100644 (file)
@@ -1053,7 +1053,7 @@ start_process (int pipe_control,
   }
 
   bresult = CreateProcessW (wpath, wcmd, NULL, NULL, GNUNET_YES,
-       DETACHED_PROCESS | CREATE_SUSPENDED, env_block, NULL, &start, &proc);
+       CREATE_NO_WINDOW | CREATE_SUSPENDED, env_block, NULL, &start, &proc);
   error_code = GetLastError ();
 
   if ((NULL == pipe_stdin) && (stdih))