summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-07-26 10:35:08 +0200
committerunknown <msvensson@neptunus.(none)>2006-07-26 10:35:08 +0200
commit9229ce4cb6de48fc9fdd4ca5fcd15e102ec42231 (patch)
tree788b93e3fee1a34f9b3bd943a03558f04b1e2a76 /mysql-test/mysql-test-run.pl
parent62f7fc828fe806b77c367162d44e8fb33cf46466 (diff)
downloadmariadb-git-9229ce4cb6de48fc9fdd4ca5fcd15e102ec42231.tar.gz
Fix problem with detecting wheter im processes has shutdown cleanly
mysql-test/mysql-test-run.pl: Fix problem with checking that all im processes has shutdown cleanly When it was detected that one of "im mysqlds" didn't shutdown, last was called to break the loop, but it only broke the inner loop. Remove the while(0) loop and make this easier by setting $clean_shutdown to 0 if any such problem is detected.
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl41
1 files changed, 17 insertions, 24 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 2f189f01d29..7b66b519537 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3485,36 +3485,29 @@ sub im_stop($) {
}
}
- # Check that all processes died.
+ # Check if all processes shutdown cleanly
+ my $clean_shutdown= 1; # Assum they did
- my $clean_shutdown= 0;
-
- while (1)
+ if (kill (0, $instance_manager->{'pid'}))
{
- if (kill (0, $instance_manager->{'pid'}))
- {
- mtr_warning("IM-main is still alive.");
- last;
- }
+ mtr_warning("IM-main is still alive.");
+ $clean_shutdown= 0;
+ }
- if (defined $instance_manager->{'angel_pid'} &&
- kill (0, $instance_manager->{'angel_pid'}))
- {
- mtr_warning("IM-angel is still alive.");
- last;
- }
+ if (defined $instance_manager->{'angel_pid'} &&
+ kill (0, $instance_manager->{'angel_pid'}))
+ {
+ mtr_warning("IM-angel is still alive.");
+ $clean_shutdown= 0;
+ }
- foreach my $pid (@mysqld_pids)
+ foreach my $pid (@mysqld_pids)
+ {
+ if (kill (0, $pid))
{
- if (kill (0, $pid))
- {
- mtr_warning("Guarded mysqld ($pid) is still alive.");
- last;
- }
+ mtr_warning("Guarded mysqld ($pid) is still alive.");
+ $clean_shutdown= 0;
}
-
- $clean_shutdown= 1;
- last;
}
# Kill leftovers (the order is important).