[test] [bug-fix] run_openssl_client() should ignore child's SIGPIPE on STDIN instead of EOF test
@@ -847,16 +847,19 @@ sub run_openssl_client {
sleep $timeout;
$chld_in->autoflush(1);
+ my $sig_pipe = $SIG{PIPE};
+ $SIG{PIPE} = 'IGNORE';
if ($request_default) {
- $chld_in->eof() || print $chld_in <<"EOT";
+ print $chld_in <<"EOT";
GET $path HTTP/1.1\r
Host: $san:$port\r
Connection: close\r
\r
EOT
} elsif (defined $request && $request ne '') {
- $chld_in->eof() || print $chld_in "$request";
+ print $chld_in "$request";
}
+ $SIG{PIPE} = $sig_pipe;
while ($timeout > 0.0) {
my $cpid_wait = waitpid($cpid, POSIX::WNOHANG);
