[MLton-commit] r6697

Wesley Terpstra wesley at mlton.org
Fri Aug 8 09:00:11 PDT 2008


Unbelievably, spawn* do not actually respect the arguements given. They need
to have escaped arguments or else they get split on spaces.


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

U   mlton/trunk/basis-library/mlton/process.sml

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

Modified: mlton/trunk/basis-library/mlton/process.sml
===================================================================
--- mlton/trunk/basis-library/mlton/process.sml	2008-08-08 14:16:33 UTC (rev 6696)
+++ mlton/trunk/basis-library/mlton/process.sml	2008-08-08 16:00:07 UTC (rev 6697)
@@ -323,6 +323,7 @@
          if useWindowsProcess
             then
                let
+                  val args = List.map cmdEscape args
                   val path = NullString.nullTerm path
                   val args = CUtil.StringVector.fromList args
                   val env = CUtil.StringVector.fromList env
@@ -349,6 +350,7 @@
             then
                let
                   val file = NullString.nullTerm file
+                  val args = List.map cmdEscape args
                   val args = CUtil.StringVector.fromList args
                in
                   (PId.fromRep o SysCall.simpleResult')




More information about the MLton-commit mailing list