1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#25657 mysql-test-run.pl kill itself under ActiveState perl

- Read the pid from pidfile in order to be able to kill the real process
instead of the pseudo process. Most platforms will have the same real_pid
as pid
- Kill using the real pid
This commit is contained in:
msvensson@shellback.(none)
2007-03-30 15:43:36 +02:00
parent 6a9811b594
commit 060fb5ed39
2 changed files with 28 additions and 14 deletions

View File

@ -2549,10 +2549,16 @@ sub ndbcluster_wait_started($$){
sub mysqld_wait_started($){
my $mysqld= shift;
my $res= sleep_until_file_created($mysqld->{'path_pid'},
$mysqld->{'start_timeout'},
$mysqld->{'pid'});
return $res == 0;
my $pid_from_pidfile=
sleep_until_file_created($mysqld->{'path_pid'},
$mysqld->{'start_timeout'},
$mysqld->{'pid'});
# On platforms with pseudo threads we need to save
# the real pid of mysqld read from pidfile
$mysqld->{'real_pid'}= $pid_from_pidfile;
return $pid_from_pidfile == 0;
}
@ -4047,6 +4053,7 @@ sub stop_all_servers () {
push(@kill_pids,{
pid => $mysqld->{'pid'},
real_pid => $mysqld->{'real_pid'},
pidfile => $mysqld->{'path_pid'},
sockfile => $mysqld->{'path_sock'},
port => $mysqld->{'port'},
@ -4253,6 +4260,7 @@ sub run_testcase_stop_servers($$$) {
push(@kill_pids,{
pid => $mysqld->{'pid'},
real_pid => $mysqld->{'real_pid'},
pidfile => $mysqld->{'path_pid'},
sockfile => $mysqld->{'path_sock'},
port => $mysqld->{'port'},
@ -4303,6 +4311,7 @@ sub run_testcase_stop_servers($$$) {
push(@kill_pids,{
pid => $mysqld->{'pid'},
real_pid => $mysqld->{'real_pid'},
pidfile => $mysqld->{'path_pid'},
sockfile => $mysqld->{'path_sock'},
port => $mysqld->{'port'},