From cb29dca0293fd4c054d5b0fc7b717dbd37005f61 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Tue, 19 Jan 2021 01:52:04 +0330 Subject: [PATCH] Shell: Don't spam perror() on kill_job() That function is allowed to be given a dead job, so don't bother with perror() --- Userland/Shell/Shell.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); } } }