Patch: Win32 Process Implementation
Mohan Embar
gnustuff@thisiscool.com
Thu Feb 20 21:20:00 GMT 2003
Hi Ranjit,
I tested your hypothesis by updating PrintArgsTest.java
(cf. "1\" 2 3 4 \"5"):
import java.io.*;
public class PrintArgsTest
{
public static void main(String[] args)
throws IOException
{
Process prc =
Runtime
.getRuntime()
.exec
(
new String[]
{
"PrintArgs.exe",
"addr2line",
"-f",
"-e",
"D:\\Program Files\\thisiscool-gcc\\examples\\PrintArgs\\PrintArgsTest.exe",
"A line with \"quotes\". So there. Ha.",
"1\" 2 3 4 \"5"
}
);
....
}
}
It produces the following output, as you predicted:
Hello from PrintArgs.exe
--> "PrintArgs.exe"
--> "addr2line"
--> "-f"
--> "-e"
--> "D:\Program Files\thisiscool-gcc\examples\PrintArgs\PrintArgsTest.exe"
--> "A line with quotes. So there. Ha."
--> "1"
--> "2"
--> "3"
--> "4"
--> "5"
I'll update and resubmit my patch to reflect this. This is pretty arcane, so
thanks for catching this!
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
More information about the Java-patches
mailing list