From: Lennart Poettering Date: Mon, 24 Sep 2018 17:04:44 +0000 (+0200) Subject: killall: filter out bogus PIDs X-Git-Tag: v240~614^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20ca2d10bdcd4ac6b7c0110635357fd0a26ca302;p=thirdparty%2Fsystemd.git 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... --- diff --git a/src/core/killall.c b/src/core/killall.c index 3dde3033fa3..37c645538cb 100644 --- a/src/core/killall.c +++ b/src/core/killall.c @@ -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 */