summaryrefslogtreecommitdiff
path: root/Userland/Shell
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-01-19 01:52:04 +0330
committerAndreas Kling <kling@serenityos.org>2021-01-19 08:19:43 +0100
commitcb29dca0293fd4c054d5b0fc7b717dbd37005f61 (patch)
treef8e66b8d092a0d9d55adcca308e47bd004c98e36 /Userland/Shell
parent86f50aa74ecf8917bfe78532ded60c0ffd4de536 (diff)
downloadserenity-cb29dca0293fd4c054d5b0fc7b717dbd37005f61.zip
Shell: Don't spam perror() on kill_job()
That function is allowed to be given a dead job, so don't bother with perror()
Diffstat (limited to 'Userland/Shell')
-rw-r--r--Userland/Shell/Shell.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp
index 45954c7678..ca51af64c8 100644
--- a/Userland/Shell/Shell.cpp
+++ b/Userland/Shell/Shell.cpp
@@ -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");
}
}
}