diff options
author | Magnus Svensson <msvensson@mysql.com> | 2008-10-06 19:52:26 +0200 |
---|---|---|
committer | Magnus Svensson <msvensson@mysql.com> | 2008-10-06 19:52:26 +0200 |
commit | 870699c9f7462d3b02461cbe5cfbe66dc5d1aff6 (patch) | |
tree | 2d5305345c0a850a1e9ff77d2309e2ab84755258 /mysql-test/lib/My/SafeProcess.pm | |
parent | ab5c044e4d653efdb38f6463e13ba5cf00589f91 (diff) | |
download | mariadb-git-870699c9f7462d3b02461cbe5cfbe66dc5d1aff6.tar.gz |
WL#4189 Only kill process that hasn't yet finished at end of mtr.pl. Improve debug printout
Diffstat (limited to 'mysql-test/lib/My/SafeProcess.pm')
-rw-r--r-- | mysql-test/lib/My/SafeProcess.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index 83749514622..f990d889a02 100644 --- a/mysql-test/lib/My/SafeProcess.pm +++ b/mysql-test/lib/My/SafeProcess.pm @@ -66,7 +66,9 @@ END { for my $proc (values %running){ if ( $proc->is_child($$) ){ #print "Killing: $proc\n"; - $proc->kill(); + if ($proc->wait_one(0)){ + $proc->kill(); + } } } } @@ -315,7 +317,7 @@ sub start_kill { $ret= system($safe_kill, $pid) >> 8; if (IS_CYGWIN and $ret == 3) { - print "safe_process is gone, kickstart the fake process\n"; + print "safe_process is gone, kickstart the fake process, $self\n"; if (kill(15, $self->{SAFE_PID}) != 1){ print STDERR "Failed to kickstart the fake process\n"; } |