summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_process.pl
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.(none)>2007-06-26 12:28:45 +0200
committerunknown <msvensson@pilot.(none)>2007-06-26 12:28:45 +0200
commitf294219b42caa96d0b1790cc6f4bb10b60c15f23 (patch)
tree580bf044f9c16f10017111db77eca2c1948b4421 /mysql-test/lib/mtr_process.pl
parentafa96081ab05efae0a82fee86aee59a595073946 (diff)
parent6437c0356a1d9730213183a7b8ed1dd24c3bf318 (diff)
downloadmariadb-git-f294219b42caa96d0b1790cc6f4bb10b60c15f23.tar.gz
Merge pilot.(none):/data/msvensson/mysql/bug25657/my50-bug25657-new2
into pilot.(none):/data/msvensson/mysql/bug25657/my51-bug25657 mysql-test/lib/mtr_process.pl: Auto merged mysql-test/lib/mtr_timer.pl: Auto merged mysql-test/mysql-test-run.pl: Merge 5.0->5.1
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r--mysql-test/lib/mtr_process.pl17
1 files changed, 16 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 0c77174e0bd..00894093e3d 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -613,6 +613,11 @@ sub mtr_check_stop_servers ($) {
if ( $pid )
{
# Server is still alive, put it in list to be hard killed
+ if ($::glob_win32_perl)
+ {
+ # Kill the real process if it's known
+ $pid= $srv->{'real_pid'} if ($srv->{'real_pid'});
+ }
$kill_pids{$pid}= 1;
# Write a message to the process's error log (if it has one)
@@ -666,6 +671,16 @@ sub mtr_check_stop_servers ($) {
}
}
+ if ($::glob_win32_perl and $srv->{'real_pid'})
+ {
+ # Wait for the pseudo pid - if the real_pid was known
+ # the pseudo pid has not been waited for yet, wai blocking
+ # since it's "such a simple program"
+ mtr_verbose("Wait for pseudo process $srv->{'pid'}");
+ my $ret_pid= waitpid($srv->{'pid'}, 0);
+ mtr_verbose("Pseudo process $ret_pid died");
+ }
+
$srv->{'pid'}= 0;
}
}
@@ -1043,7 +1058,7 @@ sub sleep_until_file_created ($$$) {
{
if ( -r $pidfile )
{
- return $pid;
+ return 1;
}
# Check if it died after the fork() was successful