1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Small fix for test suite:

- fix for IM stopping routine;
  - polishing.
This commit is contained in:
anozdrin@mysql.com
2006-06-19 14:15:26 +04:00
parent 2e56e82180
commit a142a4d97b
2 changed files with 61 additions and 10 deletions

View File

@@ -890,19 +890,28 @@ sub mtr_kill_processes ($) {
sub mtr_kill_process ($$$$) {
my $pid= shift;
my $signal= shift;
my $retries= shift;
my $total_retries= shift;
my $timeout= shift;
while (1)
for (my $cur_attempt= 1; $cur_attempt <= $total_retries; ++$cur_attempt)
{
mtr_debug("Sending $signal to $pid...");
kill($signal, $pid);
last unless kill (0, $pid) and $retries--;
unless (kill (0, $pid))
{
mtr_debug("Process $pid died.");
return;
}
mtr_debug("Sleep $timeout second waiting for processes to die");
mtr_debug("Sleeping $timeout second(s) waiting for processes to die...");
sleep($timeout);
}
mtr_debug("Process $pid is still alive after $total_retries " .
"of sending signal $signal.");
}
##############################################################################