diff options
Diffstat (limited to 'otherlibs/win32unix')
-rw-r--r-- | otherlibs/win32unix/createprocess.c | 2 | ||||
-rw-r--r-- | otherlibs/win32unix/open.c | 9 | ||||
-rw-r--r-- | otherlibs/win32unix/winwait.c | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/otherlibs/win32unix/createprocess.c b/otherlibs/win32unix/createprocess.c index 8a92d18f0..d91d707b4 100644 --- a/otherlibs/win32unix/createprocess.c +++ b/otherlibs/win32unix/createprocess.c @@ -62,7 +62,7 @@ value win_create_process_native(value cmd, value cmdline, value env, CloseHandle(pi.hThread); /* Return the process handle as pseudo-PID (this is consistent with the wait() emulation in the MSVC C library */ - return Val_int(pi.hProcess); + return Val_long(pi.hProcess); } CAMLprim value win_create_process(value * argv, int argn) diff --git a/otherlibs/win32unix/open.c b/otherlibs/win32unix/open.c index 76e73e3ae..f2f334bbb 100644 --- a/otherlibs/win32unix/open.c +++ b/otherlibs/win32unix/open.c @@ -18,12 +18,13 @@ #include "unixsupport.h" #include <fcntl.h> -static int open_access_flags[8] = { - GENERIC_READ, GENERIC_WRITE, GENERIC_READ|GENERIC_WRITE, 0, 0, 0, 0, 0, +static int open_access_flags[12] = { + GENERIC_READ, GENERIC_WRITE, GENERIC_READ|GENERIC_WRITE, + 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static int open_create_flags[8] = { - 0, 0, 0, 0, 0, O_CREAT, O_TRUNC, O_EXCL +static int open_create_flags[12] = { + 0, 0, 0, 0, 0, O_CREAT, O_TRUNC, O_EXCL, 0, 0, 0, 0 }; CAMLprim value unix_open(value path, value flags, value perm) diff --git a/otherlibs/win32unix/winwait.c b/otherlibs/win32unix/winwait.c index ad510c4b4..895a6926b 100644 --- a/otherlibs/win32unix/winwait.c +++ b/otherlibs/win32unix/winwait.c @@ -63,6 +63,8 @@ CAMLprim value win_waitpid(value vflags, value vpid_req) } if (status == STILL_ACTIVE) return alloc_process_status((HANDLE) 0, 0); - else + else { + CloseHandle(pid_req); return alloc_process_status(pid_req, status); + } } |