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
Notes: sideshowbarker 2024-07-18 23:03:32 +09:00

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");
}
}
}