[MLton-commit] r7157

Matthew Fluet fluet at mlton.org
Wed Jun 17 09:48:56 PDT 2009


Add Windows_Process_createNull that passes a NULL environment to Windows_Process_create.
----------------------------------------------------------------------

U   mlton/trunk/basis-library/primitive/basis-ffi.sml
U   mlton/trunk/runtime/basis-ffi.h
U   mlton/trunk/runtime/gen/basis-ffi.def
U   mlton/trunk/runtime/gen/basis-ffi.h
U   mlton/trunk/runtime/gen/basis-ffi.sml
U   mlton/trunk/runtime/platform/windows.c

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/primitive/basis-ffi.sml
===================================================================
--- mlton/trunk/basis-library/primitive/basis-ffi.sml	2009-06-17 16:42:48 UTC (rev 7156)
+++ mlton/trunk/basis-library/primitive/basis-ffi.sml	2009-06-17 16:48:55 UTC (rev 7157)
@@ -1142,6 +1142,7 @@
 structure Process = 
 struct
 val create = _import "Windows_Process_create" private : NullString8.t * NullString8.t * NullString8.t * C_Fd.t * C_Fd.t * C_Fd.t -> (C_PId.t) C_Errno.t;
+val createNull = _import "Windows_Process_createNull" private : NullString8.t * NullString8.t * C_Fd.t * C_Fd.t * C_Fd.t -> (C_PId.t) C_Errno.t;
 val getexitcode = _import "Windows_Process_getexitcode" private : C_PId.t * (C_Status.t) ref -> (C_Int.t) C_Errno.t;
 val terminate = _import "Windows_Process_terminate" private : C_PId.t * C_Signal.t -> (C_Int.t) C_Errno.t;
 end

Modified: mlton/trunk/runtime/basis-ffi.h
===================================================================
--- mlton/trunk/runtime/basis-ffi.h	2009-06-17 16:42:48 UTC (rev 7156)
+++ mlton/trunk/runtime/basis-ffi.h	2009-06-17 16:48:55 UTC (rev 7157)
@@ -934,6 +934,7 @@
 PRIVATE void Stdio_printStdout(String8_t);
 PRIVATE C_Int_t Time_getTimeOfDay(Ref(C_Time_t),Ref(C_SUSeconds_t));
 PRIVATE C_Errno_t(C_PId_t) Windows_Process_create(NullString8_t,NullString8_t,NullString8_t,C_Fd_t,C_Fd_t,C_Fd_t);
+PRIVATE C_Errno_t(C_PId_t) Windows_Process_createNull(NullString8_t,NullString8_t,C_Fd_t,C_Fd_t,C_Fd_t);
 PRIVATE C_Errno_t(C_Int_t) Windows_Process_getexitcode(C_PId_t,Ref(C_Status_t));
 PRIVATE C_Errno_t(C_Int_t) Windows_Process_terminate(C_PId_t,C_Signal_t);
 MLTON_CODEGEN_STATIC_INLINE Word16_t Word16_add(Word16_t,Word16_t);

Modified: mlton/trunk/runtime/gen/basis-ffi.def
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.def	2009-06-17 16:42:48 UTC (rev 7156)
+++ mlton/trunk/runtime/gen/basis-ffi.def	2009-06-17 16:48:55 UTC (rev 7157)
@@ -824,6 +824,7 @@
 Stdio.printStdout = _import PRIVATE : String8.t -> unit
 Time.getTimeOfDay = _import PRIVATE : C_Time.t ref * C_SUSeconds.t ref -> C_Int.t
 Windows.Process.create = _import PRIVATE : NullString8.t * NullString8.t * NullString8.t * C_Fd.t * C_Fd.t * C_Fd.t -> C_PId.t C_Errno.t
+Windows.Process.createNull = _import PRIVATE : NullString8.t * NullString8.t * C_Fd.t * C_Fd.t * C_Fd.t -> C_PId.t C_Errno.t
 Windows.Process.getexitcode = _import PRIVATE : C_PId.t * C_Status.t ref -> C_Int.t C_Errno.t
 Windows.Process.terminate = _import PRIVATE : C_PId.t * C_Signal.t -> C_Int.t C_Errno.t
 ##

Modified: mlton/trunk/runtime/gen/basis-ffi.h
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.h	2009-06-17 16:42:48 UTC (rev 7156)
+++ mlton/trunk/runtime/gen/basis-ffi.h	2009-06-17 16:48:55 UTC (rev 7157)
@@ -934,6 +934,7 @@
 PRIVATE void Stdio_printStdout(String8_t);
 PRIVATE C_Int_t Time_getTimeOfDay(Ref(C_Time_t),Ref(C_SUSeconds_t));
 PRIVATE C_Errno_t(C_PId_t) Windows_Process_create(NullString8_t,NullString8_t,NullString8_t,C_Fd_t,C_Fd_t,C_Fd_t);
+PRIVATE C_Errno_t(C_PId_t) Windows_Process_createNull(NullString8_t,NullString8_t,C_Fd_t,C_Fd_t,C_Fd_t);
 PRIVATE C_Errno_t(C_Int_t) Windows_Process_getexitcode(C_PId_t,Ref(C_Status_t));
 PRIVATE C_Errno_t(C_Int_t) Windows_Process_terminate(C_PId_t,C_Signal_t);
 MLTON_CODEGEN_STATIC_INLINE Word16_t Word16_add(Word16_t,Word16_t);

Modified: mlton/trunk/runtime/gen/basis-ffi.sml
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.sml	2009-06-17 16:42:48 UTC (rev 7156)
+++ mlton/trunk/runtime/gen/basis-ffi.sml	2009-06-17 16:48:55 UTC (rev 7157)
@@ -1142,6 +1142,7 @@
 structure Process = 
 struct
 val create = _import "Windows_Process_create" private : NullString8.t * NullString8.t * NullString8.t * C_Fd.t * C_Fd.t * C_Fd.t -> (C_PId.t) C_Errno.t;
+val createNull = _import "Windows_Process_createNull" private : NullString8.t * NullString8.t * C_Fd.t * C_Fd.t * C_Fd.t -> (C_PId.t) C_Errno.t;
 val getexitcode = _import "Windows_Process_getexitcode" private : C_PId.t * (C_Status.t) ref -> (C_Int.t) C_Errno.t;
 val terminate = _import "Windows_Process_terminate" private : C_PId.t * C_Signal.t -> (C_Int.t) C_Errno.t;
 end

Modified: mlton/trunk/runtime/platform/windows.c
===================================================================
--- mlton/trunk/runtime/platform/windows.c	2009-06-17 16:42:48 UTC (rev 7156)
+++ mlton/trunk/runtime/platform/windows.c	2009-06-17 16:48:55 UTC (rev 7157)
@@ -398,6 +398,12 @@
         return (C_PId_t)pi.hProcess;
 }
 
+C_Errno_t(C_PId_t) 
+Windows_Process_createNull (NullString8_t cmds, NullString8_t args, 
+                            C_Fd_t in, C_Fd_t out, C_Fd_t err) {
+  return Windows_Process_create (cmds, args, NULL, in, out, err);
+}
+
 C_Errno_t(C_Int_t) Windows_Process_getexitcode (C_PId_t pid, Ref(C_Status_t) status) {
         HANDLE h;
 




More information about the MLton-commit mailing list