mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-20 01:16:14 +00:00
PerconaTest::full_output: Fix a bug in the returned status
This commit is contained in:
@@ -725,7 +725,6 @@ sub full_output {
|
|||||||
*STDERR = *STDOUT;
|
*STDERR = *STDOUT;
|
||||||
|
|
||||||
my $status;
|
my $status;
|
||||||
warn $file;
|
|
||||||
if (my $pid = fork) {
|
if (my $pid = fork) {
|
||||||
if ( my $t = $args{wait_for} ) {
|
if ( my $t = $args{wait_for} ) {
|
||||||
# Wait for t seconds then kill the child.
|
# Wait for t seconds then kill the child.
|
||||||
@@ -741,11 +740,10 @@ sub full_output {
|
|||||||
sleep 0.25;
|
sleep 0.25;
|
||||||
}
|
}
|
||||||
waitpid($pid, 0);
|
waitpid($pid, 0);
|
||||||
$status = $?;
|
$status = $? >> 8;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$code->();
|
exit $code->();
|
||||||
exit 0;
|
|
||||||
}
|
}
|
||||||
close *output_fh;
|
close *output_fh;
|
||||||
my $output = do { local $/; open my $fh, "<", $file or die $!; <$fh> };
|
my $output = do { local $/; open my $fh, "<", $file or die $!; <$fh> };
|
||||||
|
Reference in New Issue
Block a user