mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
mtr_timer.pl:
Simplified and corrected mtr_timer_stop_all() mysql-test/lib/mtr_timer.pl: Simplified and corrected mtr_timer_stop_all()
This commit is contained in:
@@ -119,21 +119,9 @@ sub mtr_timer_stop_all ($) {
|
|||||||
|
|
||||||
foreach my $name ( keys %{$timers->{'timers'}} )
|
foreach my $name ( keys %{$timers->{'timers'}} )
|
||||||
{
|
{
|
||||||
my $tpid= $timers->{'timers'}->{$name}->{'pid'};
|
mtr_timer_stop($name);
|
||||||
|
|
||||||
# FIXME as Cygwin reuses pids fast, maybe check that is
|
|
||||||
# the expected process somehow?!
|
|
||||||
kill(9, $tpid);
|
|
||||||
|
|
||||||
# As the timers are so simple programs, we trust them to terminate,
|
|
||||||
# and use blocking wait for it. We wait just to avoid a zombie.
|
|
||||||
waitpid($tpid,0);
|
|
||||||
|
|
||||||
delete $timers->{'timers'}->{$name}; # Remove the timer information
|
|
||||||
delete $timers->{'pids'}->{$tpid}; # and PID reference
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user