Commit d19d4b3f authored by unknown's avatar unknown

Protect against killing pid's that would "killall" or "kill self"

parent aa043d73
...@@ -1086,6 +1086,13 @@ sub mtr_kill_processes ($) { ...@@ -1086,6 +1086,13 @@ sub mtr_kill_processes ($) {
foreach my $pid (@$pids) foreach my $pid (@$pids)
{ {
if ($pid <= 0)
{
mtr_warning("Trying to kill illegal pid: $pid");
next;
}
foreach my $sig (15, 9) foreach my $sig (15, 9)
{ {
last if mtr_im_kill_process([ $pid ], $sig, 10, 1); last if mtr_im_kill_process([ $pid ], $sig, 10, 1);
......
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