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:
@@ -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.");
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
||||
Reference in New Issue
Block a user