Commit d18f67bb authored by sayantan dutta's avatar sayantan dutta

Bug #17926328 - MTR SHOULD NOT WAIT FOR CHILDREN WHEN ABORTING TEST RUN ON WINDOWS

parent 42bfa908
#!/usr/bin/perl #!/usr/bin/perl
# -*- cperl -*- # -*- 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 # 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 # it under the terms of the GNU General Public License as published by
...@@ -474,15 +474,17 @@ sub main { ...@@ -474,15 +474,17 @@ sub main {
# Send Ctrl-C to any children still running # Send Ctrl-C to any children still running
kill("INT", keys(%children)); kill("INT", keys(%children));
# Wait for childs to exit if (!IS_WINDOWS) {
foreach my $pid (keys %children) # Wait for children to exit
{ foreach my $pid (keys %children)
my $ret_pid= waitpid($pid, 0); {
if ($ret_pid != $pid){ my $ret_pid= waitpid($pid, 0);
mtr_report("Unknown process $ret_pid exited"); if ($ret_pid != $pid){
} mtr_report("Unknown process $ret_pid exited");
else { }
delete $children{$ret_pid}; else {
delete $children{$ret_pid};
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment