Commit d26965c3 authored by msvensson@pilot.blaudden's avatar msvensson@pilot.blaudden
Browse files

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

parent 90599614
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);