Stefan Bodewig wrote:

On 27 Apr 2004, <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to