[MLton-commit] r7145

Matthew Fluet fluet at mlton.org
Sun Jun 14 16:25:19 PDT 2009


Contrary to the comments in r6699, spawn does not need escaped arguments (in cygwin).
----------------------------------------------------------------------

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

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

Modified: mlton/trunk/basis-library/mlton/process.sml
===================================================================
--- mlton/trunk/basis-library/mlton/process.sml	2009-06-14 23:01:36 UTC (rev 7144)
+++ mlton/trunk/basis-library/mlton/process.sml	2009-06-14 23:25:18 UTC (rev 7145)
@@ -269,17 +269,7 @@
          if not (strContains " \t\"" y) andalso y<>"" then y else
          String.implode (List.rev (#"\"" :: mingwQuote y))
 
-      (* In cygwin, according to what I read, \ should always become \\.
-       * Furthermore, more characters cause escaping as compared to MinGW. 
-       * From what I read, " should become "", not \", but I leave the old
-       * behaviour alone until someone runs the spawn regression.
-       *)
-      fun cygwinEscape y = 
-         if not (strContains " \t\"\r\n\f'" y) andalso y<>"" then y else
-         concat ["\"",
-                 String.translate
-                 (fn #"\"" => "\\\"" | #"\\" => "\\\\" | x => String.str x) y,
-                 "\""]
+      fun cygwinEscape y = y
 
       val cmdEscape = 
          if MLton.Platform.OS.host = MLton.Platform.OS.MinGW




More information about the MLton-commit mailing list