diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2001-10-02 09:26:59 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2001-10-02 09:26:59 +0000 |
commit | 13f0597ebcc3a0401d2b194ef6136196a948907a (patch) | |
tree | 984d3d436b768d2926331dbbb531cb7f974a037f /otherlibs/win32unix/createprocess.c | |
parent | 5e9037e576bfbe6ea48e52cc8539edce716a1254 (diff) |
remove spurious flags
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3823 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/createprocess.c')
-rw-r--r-- | otherlibs/win32unix/createprocess.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/otherlibs/win32unix/createprocess.c b/otherlibs/win32unix/createprocess.c index a99af4036..f2c845e04 100644 --- a/otherlibs/win32unix/createprocess.c +++ b/otherlibs/win32unix/createprocess.c @@ -41,14 +41,15 @@ value win_create_process_native(value cmd, value cmdline, value env, 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). - Otherwise, a new console is created and the redirections - are ignored. If we're running a GUI application, the - newly created console doesn't matter. */ + 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()) flags = 0; else { flags = CREATE_NEW_CONSOLE; - si.dwFlags |= STARTF_USESHOWWINDOW; + si.dwFlags = (STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES); si.wShowWindow = SW_HIDE; } /* Create the process */ @@ -71,7 +72,8 @@ CAMLprim value win_create_process(value * argv, int argn) static int win_has_console(void) { - HANDLE h; + HANDLE h, log; + int i; h = CreateFile("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); |