in t/ab/base.t [16:27]
sub run_and_gather_output {
my $command = shift;
t_debug "# running: ", $command, "\n";
my ($cin, $cout, $cerr);
$cerr = gensym();
my $pid = open3($cin, $cout, $cerr, $command);
waitpid( $pid, 0 );
my $status = $? >> 8;
my @cstdout = <$cout>;
my @cstderr = <$cerr>;
return { status => $status, stdout => \@cstdout, stderr => \@cstderr };
}