mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge branch '10.4' into 10.5
This commit is contained in:
@@ -389,10 +389,10 @@ sub _collect {
|
||||
# 1 Still running
|
||||
#
|
||||
sub wait_one {
|
||||
my ($self, $timeout)= @_;
|
||||
croak "usage: \$safe_proc->wait_one([timeout])" unless ref $self;
|
||||
my ($self, $timeout, $keep)= @_;
|
||||
croak "usage: \$safe_proc->wait_one([timeout] [, keep])" unless ref $self;
|
||||
|
||||
_verbose("wait_one $self, $timeout");
|
||||
_verbose("wait_one $self, $timeout, $keep");
|
||||
|
||||
if ( ! defined($self->{SAFE_PID}) ) {
|
||||
# No pid => not running
|
||||
@@ -466,16 +466,16 @@ sub wait_one {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( not $blocking and $retpid == -1 ) {
|
||||
# still running
|
||||
_verbose("still running");
|
||||
return 1;
|
||||
}
|
||||
#if ( not $blocking and $retpid == -1 ) {
|
||||
# # still running
|
||||
# _verbose("still running");
|
||||
# return 1;
|
||||
#}
|
||||
|
||||
#warn "wait_one: expected pid $pid but got $retpid"
|
||||
# unless( $retpid == $pid );
|
||||
|
||||
$self->_collect($exit_code);
|
||||
$self->_collect($exit_code) unless $keep;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ BEGIN
|
||||
eval 'sub USE_NETPING { $use_netping }';
|
||||
}
|
||||
|
||||
sub sleep_until_file_created ($$$$);
|
||||
sub sleep_until_file_created ($$$$$);
|
||||
sub mtr_ping_port ($);
|
||||
|
||||
sub mtr_ping_port ($) {
|
||||
@@ -102,8 +102,9 @@ sub mtr_ping_port ($) {
|
||||
|
||||
# FIXME check that the pidfile contains the expected pid!
|
||||
|
||||
sub sleep_until_file_created ($$$$) {
|
||||
sub sleep_until_file_created ($$$$$) {
|
||||
my $pidfile= shift;
|
||||
my $expectfile = shift;
|
||||
my $timeout= shift;
|
||||
my $proc= shift;
|
||||
my $warn_seconds = shift;
|
||||
@@ -120,8 +121,9 @@ sub sleep_until_file_created ($$$$) {
|
||||
my $seconds= ($loop * $sleeptime) / 1000;
|
||||
|
||||
# Check if it died after the fork() was successful
|
||||
if ( defined $proc and ! $proc->wait_one(0) )
|
||||
if ( defined $proc and ! $proc->wait_one(0, 1) )
|
||||
{
|
||||
return 1 if -r $expectfile;
|
||||
mtr_warning("Process $proc died after mysql-test-run waited $seconds " .
|
||||
"seconds for $pidfile to be created.");
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user