killall: fix errno check

This commit is contained in:
Frantisek Sumsal 2023-12-25 12:18:02 +01:00
parent 4b68f70829
commit 6f7936cf57

View file

@ -257,7 +257,7 @@ static int killall(int sig, Set *pids, bool send_sighup) {
r = pidref_kill(&pidref, sig);
if (r < 0) {
if (errno != -ESRCH)
if (r != -ESRCH)
log_warning_errno(errno, "Could not kill " PID_FMT ", ignoring: %m", pidref.pid);
} else {
n_killed++;