Stefan Bodewig wrote:
>On 27 Apr 2004, <mbenson@apache.org> wrote:
>
>
>
>> } catch (InterruptedException e) {
>> process.destroy();
>> + } finally {
>> + try {
>> + process.getInputStream().close();
>> + process.getOutputStream().close();
>> + process.getErrorStream().close();
>> + } catch (IOException eyeOhEx) {
>> }
>> }
>>
>>
>
>Is it save to call getXYZStream on a Process instance after it has
>terminated or even been destroyed? I've never tried it and the
>Javadocs don't say anything.
>
>
>
Also each of the closees should be in their own try-catch.
try {
process.getInputStream().close();
} catch (Throwable t) {
// Ignore exception
}
should work
Peter
>Stefan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|