summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/createprocess.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2009-07-20 11:51:50 +0000
committerDamien Doligez <damien.doligez-inria.fr>2009-07-20 11:51:50 +0000
commit71b94fa3e8d73c40e298409fa5fd6501383d38a6 (patch)
tree504323f26750574f581a8a7b904409b46019e45d /otherlibs/win32unix/createprocess.c
parent591d89e773efe451f509ecd059cba49c15f2cae2 (diff)
merge changes from ocaml3111rc0 to ocaml3111
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/createprocess.c')
-rw-r--r--otherlibs/win32unix/createprocess.c7
1 files changed, 3 insertions, 4 deletions
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())