Merge pull request #4530 from alyssais/kill

libutil: EPERM from kill(-1, ...) is fine
This commit is contained in:
Eelco Dolstra 2021-02-26 12:19:16 +01:00 committed by GitHub
commit 5edab777d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -946,7 +946,7 @@ void killUser(uid_t uid)
#else
if (kill(-1, SIGKILL) == 0) break;
#endif
if (errno == ESRCH) break; /* no more processes */
if (errno == ESRCH || errno == EPERM) break; /* no more processes */
if (errno != EINTR)
throw SysError("cannot kill processes for uid '%1%'", uid);
}