Protect against killing pid's that would "killall" or "kill self"
This commit is contained in:
parent
aa043d73bf
commit
d19d4b3f4f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user