printing exceptions?

Tom Tromey tromey@redhat.com
Tue Mar 5 14:12:00 GMT 2002


>>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:

Bryce> I see it hanging on the read() call at
Bryce> natPosixProcess.cc:278. Seems like Runtime.exec() always fails
Bryce> under the interpreter (works fine from compiled code). Weird
Bryce> indeed.

Bryce> public class Test
Bryce> {
Bryce>   public static void main(String[] args) throws java.io.IOException
Bryce>   {
Bryce>     Process p = Runtime.getRuntime().exec("ls");
Bryce>   }
Bryce> }

I've spent an inordinate amount of time looking at this.  I've rebuilt
libgcj from scratch 5 or 6 times in the last couple days.

I think the bug occurs here:

    LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@

If I change this to use `--tag=CC', then the bug goes away.
I have no theory to explain this.

Alexandre, do you have any insight here?
Is there any reason I shouldn't just make the above change and check
it in?  This represents a very serious (and weird) regression.

Tom



More information about the Java mailing list