Browse Source

Fix for BR #48789.

Handle an IOE with "Pipe broken" just like a one with "Write end dead". They are raised for the same reason but not at the same time.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1097584 13f79535-47bb-0310-9956-ffa450edef68
master
Nicolas Lalevee 14 years ago
parent
commit
49c8751e25
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/util/LeadPipeInputStream.java

+ 2
- 1
src/main/org/apache/tools/ant/util/LeadPipeInputStream.java View File

@@ -87,7 +87,8 @@ public class LeadPipeInputStream extends PipedInputStream {
result = super.read();
} catch (IOException eyeOhEx) {
String msg = eyeOhEx.getMessage();
if ("write end dead".equalsIgnoreCase(msg)) {
if ("write end dead".equalsIgnoreCase(msg)
|| "pipe broken".equalsIgnoreCase(msg)) {
if (super.in > 0 && super.out < super.buffer.length
&& super.out > super.in) {
result = super.buffer[super.out++] & BYTE_MASK;


Loading…
Cancel
Save