Parcourir la source

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

That function is allowed to be given a dead job, so don't bother with
perror()
AnotherTest il y a 4 ans
Parent
commit
cb29dca029
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      Userland/Shell/Shell.cpp

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