summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_process.pl
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-04-23 11:01:22 +0200
committerunknown <msvensson@pilot.blaudden>2007-04-23 11:01:22 +0200
commitd19d4b3f4f24c01f79cd4d281ae351e5a7faa2fa (patch)
tree004744714a193a6d942361869ac903e21bdfd48b /mysql-test/lib/mtr_process.pl
parentaa043d73bf1a909469f29470934b05a6c4e47973 (diff)
downloadmariadb-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.pl7
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);