]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fork-journal: Don't log if process is already gone in journal_terminate()
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Thu, 3 Jul 2025 08:48:33 +0000 (10:48 +0200)
committerDaanDeMeyer <daan.j.demeyer@gmail.com>
Mon, 14 Jul 2025 13:07:48 +0000 (15:07 +0200)
src/shared/fork-journal.c

index 4fac8dead172347bc463d1b81f25ca54dd746400..ec22a7006131737791bc10b8776a39a95368a5db 100644 (file)
@@ -196,7 +196,7 @@ void journal_terminate(PidRef *pidref) {
                 return;
 
         r = pidref_kill(pidref, SIGTERM);
-        if (r < 0)
+        if (r < 0 && r != -ESRCH)
                 log_debug_errno(r, "Failed to send SIGTERM to journalctl child " PID_FMT ", ignoring: %m", pidref->pid);
 
         (void) pidref_wait_for_terminate_and_check("journalctl", pidref, /* flags= */ 0);