Loading mysql-test/lib/mtr_io.pl +5 −7 Original line number Diff line number Diff line Loading @@ -37,18 +37,16 @@ sub mtr_get_pid_from_file ($) { open(FILE, '<', $pid_file_path) or mtr_error("can't open file \"$pid_file_path\": $!"); # Read pid number from file my $pid= <FILE>; chomp($pid) if defined $pid; close FILE; return $pid if defined $pid && $pid ne ''; return $pid if $pid=~ /^(\d+)/; mtr_debug("Pid file '$pid_file_path' is empty. " . "Sleeping $timeout second(s)..."); mtr_debug("Pid file '$pid_file_path' does not yet contain pid number.\n" . "Sleeping $timeout second(s) more..."); sleep(1); sleep($timeout); } mtr_error("Pid file '$pid_file_path' is corrupted. " . Loading mysql-test/lib/mtr_process.pl +25 −15 Original line number Diff line number Diff line Loading @@ -438,6 +438,10 @@ sub mtr_kill_leftovers () { while ( my $elem= readdir(RUNDIR) ) { # Only read pid from files that end with .pid if ( $elem =~ /.*[.]pid$/) { my $pidfile= "$rundir/$elem"; if ( -f $pidfile ) Loading @@ -459,6 +463,12 @@ sub mtr_kill_leftovers () { } } } else { mtr_warning("Found non pid file $elem in $rundir"); next; } } closedir(RUNDIR); if ( @pids ) Loading Loading
mysql-test/lib/mtr_io.pl +5 −7 Original line number Diff line number Diff line Loading @@ -37,18 +37,16 @@ sub mtr_get_pid_from_file ($) { open(FILE, '<', $pid_file_path) or mtr_error("can't open file \"$pid_file_path\": $!"); # Read pid number from file my $pid= <FILE>; chomp($pid) if defined $pid; close FILE; return $pid if defined $pid && $pid ne ''; return $pid if $pid=~ /^(\d+)/; mtr_debug("Pid file '$pid_file_path' is empty. " . "Sleeping $timeout second(s)..."); mtr_debug("Pid file '$pid_file_path' does not yet contain pid number.\n" . "Sleeping $timeout second(s) more..."); sleep(1); sleep($timeout); } mtr_error("Pid file '$pid_file_path' is corrupted. " . Loading
mysql-test/lib/mtr_process.pl +25 −15 Original line number Diff line number Diff line Loading @@ -438,6 +438,10 @@ sub mtr_kill_leftovers () { while ( my $elem= readdir(RUNDIR) ) { # Only read pid from files that end with .pid if ( $elem =~ /.*[.]pid$/) { my $pidfile= "$rundir/$elem"; if ( -f $pidfile ) Loading @@ -459,6 +463,12 @@ sub mtr_kill_leftovers () { } } } else { mtr_warning("Found non pid file $elem in $rundir"); next; } } closedir(RUNDIR); if ( @pids ) Loading