From: Andy Polyakov Date: Wed, 18 Apr 2018 08:42:23 +0000 (+0200) Subject: TLSProxy/Proxy.pm: preclude output intermix. X-Git-Tag: OpenSSL_1_1_1-pre6~87 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f3d3b362553d95047d93608edd15d20aa6e6e0fd;p=oweals%2Fopenssl.git TLSProxy/Proxy.pm: preclude output intermix. s_server -rev emits info output on stderr, i.e. unbufferred, which risks intermixing with output from TLSProxy itself on non-line boundaries, which in turn is confusing to TAP parser. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5975) --- diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm index df17731b2d..de6d2fdf50 100644 --- a/util/perl/TLSProxy/Proxy.pm +++ b/util/perl/TLSProxy/Proxy.pm @@ -239,7 +239,7 @@ sub start open(my $savedin, "<&STDIN"); # Temporarily replace STDIN so that sink process can inherit it... - $pid = open(STDIN, "$execcmd |") or die "Failed to $execcmd: $!\n"; + $pid = open(STDIN, "$execcmd 2>&1 |") or die "Failed to $execcmd: $!\n"; $self->{real_serverpid} = $pid; # Process the output from s_server until we find the ACCEPT line, which