This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Win32 Process Implementation
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 20 Feb 2003 15:20:39 -0600
- Subject: Re: Patch: Win32 Process Implementation
- Reply-to: gnustuff at thisiscool dot com
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/