harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Deakin <oliver.dea...@googlemail.com>
Subject Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06
Date Wed, 21 Jun 2006 19:35:58 GMT
The example returns once they have fixed it. If you look at the example
just before the "Why Runtime.exec() hangs" heading (BadExecJava2.java)
you will see a situation that is almost exactly the same as in the test 
case.
i.e. an exec followed by a waitFor(), without any reading of streams.
In this case the exec never returns.

The later example is how to fix it.

Regards,
Oliver


Geir Magnusson Jr wrote:
> Oliver Deakin wrote:
>   
>> I remember seeing problems like this before, in a non-Harmony jre, where a
>> Runtime.exec() would never return. I hunted around and found an
>> interesting page
>> on JavaWorld:
>>
>>  http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
>>
>> I found the "Why Runtime.exec() hangs" section very useful, and it
>> solved my problem
>> at the time. I'm not saying that what you're seeing is definitely the
>> same thing that I encountered,
>> but it may help. I notice that in this test stdout and stderr for the
>> process are not read - is it
>> possible that it is producing some output, and since it isn't being read
>> the process just waits
>> leading to the exec never exiting?
>>     
>
> I think the phrasing in the article is misleading, because we're not
> seeing exec() *return*, which is a different issue than the case that
> they are talking about, namely the subsequent waitFor() not returning.
>
> So I think this doesn't apply.  Interesting reading, though.
>
> geir
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
>   

-- 
Oliver Deakin
IBM United Kingdom Limited


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message