From d18f67bbab25cb15b0ca2b91693a7e134ac0cbb4 Mon Sep 17 00:00:00 2001 From: sayantan dutta Date: Tue, 25 Feb 2014 18:42:14 +0530 Subject: [PATCH] Bug #17926328 - MTR SHOULD NOT WAIT FOR CHILDREN WHEN ABORTING TEST RUN ON WINDOWS --- mysql-test/mysql-test-run.pl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 378c1f8c8d9..e236d3ce267 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- cperl -*- -# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -474,15 +474,17 @@ sub main { # Send Ctrl-C to any children still running kill("INT", keys(%children)); - # Wait for childs to exit - foreach my $pid (keys %children) - { - my $ret_pid= waitpid($pid, 0); - if ($ret_pid != $pid){ - mtr_report("Unknown process $ret_pid exited"); - } - else { - delete $children{$ret_pid}; + if (!IS_WINDOWS) { + # Wait for children to exit + foreach my $pid (keys %children) + { + my $ret_pid= waitpid($pid, 0); + if ($ret_pid != $pid){ + mtr_report("Unknown process $ret_pid exited"); + } + else { + delete $children{$ret_pid}; + } } }