From 49c8751e25255d69c69d104821b411170966685f Mon Sep 17 00:00:00 2001 From: Nicolas Lalevee Date: Thu, 28 Apr 2011 19:39:53 +0000 Subject: [PATCH] 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 --- src/main/org/apache/tools/ant/util/LeadPipeInputStream.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java b/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java index 2d58d5b04..9ebc10c2c 100644 --- a/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java +++ b/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java @@ -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;