diff options
author | unknown <msvensson@pilot.blaudden> | 2007-04-23 11:01:22 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-04-23 11:01:22 +0200 |
commit | d19d4b3f4f24c01f79cd4d281ae351e5a7faa2fa (patch) | |
tree | 004744714a193a6d942361869ac903e21bdfd48b /mysql-test/lib/mtr_process.pl | |
parent | aa043d73bf1a909469f29470934b05a6c4e47973 (diff) | |
download | mariadb-git-d19d4b3f4f24c01f79cd4d281ae351e5a7faa2fa.tar.gz |
Protect against killing pid's that would "killall" or "kill self"
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index e9e0dcce1b8..ad0fea465d6 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -1086,6 +1086,13 @@ sub mtr_kill_processes ($) { foreach my $pid (@$pids) { + + if ($pid <= 0) + { + mtr_warning("Trying to kill illegal pid: $pid"); + next; + } + foreach my $sig (15, 9) { last if mtr_im_kill_process([ $pid ], $sig, 10, 1); |