mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
mtr_misc.pl, mtr_report.pl:
Try kill all children to the mysql-test-run process when exiting mtr_process.pl: Added new function mtr_exit() that try kill all children to the mysql-test-run process when exiting mysql-test-run.pl: Try kill all children to the mysql-test-run process when exiting New --vardir caused problems on Windows Changed faulty calls to error() to mtr_error() mysql-test/mysql-test-run.pl: Try kill all children to the mysql-test-run process when exiting New --vardir caused problems on Windows Changed faulty calls to error() to mtr_error() mysql-test/lib/mtr_report.pl: Try kill all children to the mysql-test-run process when exiting mysql-test/lib/mtr_process.pl: Added new function mtr_exit() that try kill all children to the mysql-test-run process when exiting mysql-test/lib/mtr_misc.pl: Try kill all children to the mysql-test-run process when exiting
This commit is contained in:
@ -25,7 +25,7 @@ sub mtr_full_hostname () {
|
||||
if ( $hostname !~ /\./ )
|
||||
{
|
||||
my $address= gethostbyname($hostname)
|
||||
or die "Couldn't resolve $hostname : $!";
|
||||
or mtr_error("Couldn't resolve $hostname : $!");
|
||||
my $fullname= gethostbyaddr($address, AF_INET);
|
||||
$hostname= $fullname if $fullname;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ sub mtr_spawn ($$$$$$);
|
||||
sub mtr_stop_mysqld_servers ($);
|
||||
sub mtr_kill_leftovers ();
|
||||
sub mtr_record_dead_children ();
|
||||
sub mtr_exit ($);
|
||||
sub sleep_until_file_created ($$$);
|
||||
|
||||
# static in C
|
||||
@ -784,4 +785,17 @@ sub sleep_until_file_created ($$$) {
|
||||
}
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# When we exit, we kill off all children
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
sub mtr_exit ($) {
|
||||
my $code= shift;
|
||||
local $SIG{HUP} = 'IGNORE';
|
||||
kill('HUP', -$$);
|
||||
exit($code);
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -268,7 +268,8 @@ sub mtr_warning (@) {
|
||||
}
|
||||
|
||||
sub mtr_error (@) {
|
||||
die "mysql-test-run: *** ERROR: ",join(" ", @_),"\n";
|
||||
print STDERR "mysql-test-run: *** ERROR: ",join(" ", @_),"\n";
|
||||
mtr_exit(1);
|
||||
}
|
||||
|
||||
sub mtr_debug (@) {
|
||||
|
Reference in New Issue
Block a user