This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Win32 Process Implementation


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/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]