From 71b94fa3e8d73c40e298409fa5fd6501383d38a6 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Mon, 20 Jul 2009 11:51:50 +0000 Subject: merge changes from ocaml3111rc0 to ocaml3111 git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- otherlibs/win32unix/createprocess.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'otherlibs/win32unix/createprocess.c') diff --git a/otherlibs/win32unix/createprocess.c b/otherlibs/win32unix/createprocess.c index d91d707b4..042eaef9e 100644 --- a/otherlibs/win32unix/createprocess.c +++ b/otherlibs/win32unix/createprocess.c @@ -35,15 +35,14 @@ value win_create_process_native(value cmd, value cmdline, value env, envp = NULL; } /* Prepare stdin/stdout/stderr redirection */ - GetStartupInfo(&si); - si.dwFlags |= STARTF_USESTDHANDLES; + ZeroMemory(&si, sizeof(STARTUPINFO)); + si.cb = sizeof(STARTUPINFO); + si.dwFlags = STARTF_USESTDHANDLES; si.hStdInput = Handle_val(fd1); si.hStdOutput = Handle_val(fd2); si.hStdError = Handle_val(fd3); /* If we do not have a console window, then we must create one before running the process (keep it hidden for apparence). - Also one must suppress spurious flags in si.dwFlags. - Otherwise the redirections are ignored. If we are starting a GUI application, the newly created console should not matter. */ if (win_has_console()) -- cgit v1.2.3-70-g09d2