summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-06-07 00:31:53 +0300
committermonty@mysql.com <>2005-06-07 00:31:53 +0300
commit775f17667be97bc76a25324e8a99e72ae445e223 (patch)
tree1a560cda860f9d9f422087da93fcdc67cd9f66d0 /mysql-test/lib
parent8c94b5fba7f6e5518616615da63c8029c5790aea (diff)
parentabb2d7aa347c0d12ad40fc04315167d3274baae0 (diff)
downloadmariadb-git-775f17667be97bc76a25324e8a99e72ae445e223.tar.gz
Merge with 4.1
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_misc.pl2
-rw-r--r--mysql-test/lib/mtr_process.pl14
-rw-r--r--mysql-test/lib/mtr_report.pl3
3 files changed, 17 insertions, 2 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 5f80864d1f7..efa1b3bec21 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -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;
}
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 78758e54aa4..7bca422773c 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -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;
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index cb41549422f..a258d139bb1 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -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 (@) {