mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
killall: filter out bogus PIDs
we might as well filter these too since negative PIDs have special semantics in kill(), and we should never trigger that...
This commit is contained in:
parent
e45154c770
commit
20ca2d10bd
@ -29,7 +29,7 @@ static bool ignore_proc(pid_t pid, bool warn_rootfs) {
|
||||
int r;
|
||||
|
||||
/* We are PID 1, let's not commit suicide */
|
||||
if (pid == 1)
|
||||
if (pid <= 1)
|
||||
return true;
|
||||
|
||||
/* Ignore kernel threads */
|
||||
|
Loading…
Reference in New Issue
Block a user