summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_process.pl
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-06-05 20:10:47 +0200
committerunknown <kent@mysql.com>2005-06-05 20:10:47 +0200
commitbfac85343fde7ad4ffbc0bd54d9f36053d574f69 (patch)
tree17ea5fb7b6381005fadaed0d492b1e41e1f91448 /mysql-test/lib/mtr_process.pl
parent062a1b8b4e09c6de8ab592d37567d40d13798875 (diff)
downloadmariadb-git-bfac85343fde7ad4ffbc0bd54d9f36053d574f69.tar.gz
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
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r--mysql-test/lib/mtr_process.pl14
1 files changed, 14 insertions, 0 deletions
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;