This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/TEST: Avoid SIGPIPEs on os390
authorKarl Williamson <public@khwilliamson.com>
Tue, 26 Mar 2013 21:44:59 +0000 (15:44 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 13 Mar 2015 16:53:11 +0000 (10:53 -0600)
This works around a problem with z/OS where if there are unread lines
from a file descriptor using this, a SIGPIPE error is raised.

t/TEST

diff --git a/t/TEST b/t/TEST
index 9fa708c..5210bc8 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -665,7 +665,10 @@ EOT
                }
            }
        }
+       my  @junk = <$results>;  # dump remaining output to prevent SIGPIPE
+                                # (so far happens only on os390)
        close $results;
+       undef @junk;
 
        if (not defined $failure) {
            $failure = 'FAILED--no leader found' unless $seen_leader;