fork-journal: Don't log if process is already gone in journal_terminate()

This commit is contained in:
DaanDeMeyer
2025-07-03 10:48:33 +02:00
parent 43d0d111d2
commit be3f7aaf44

View 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);