1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Shell: Don't spam perror() on kill_job()

That function is allowed to be given a dead job, so don't bother with
perror()
This commit is contained in:
AnotherTest 2021-01-19 01:52:04 +03:30 committed by Andreas Kling
parent 86f50aa74e
commit cb29dca029

View file

@ -1833,7 +1833,8 @@ void Shell::kill_job(const Job* job, int sig)
if (killpg(job->pgid(), sig) < 0) {
if (kill(job->pid(), sig) < 0) {
perror("kill");
if (errno != ESRCH)
perror("kill");
}
}
}