]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-journal/journal-send: use is_main_thread() where appropriate
authorMike Yuan <me@yhndnzj.com>
Tue, 4 Mar 2025 17:41:23 +0000 (18:41 +0100)
committerMike Yuan <me@yhndnzj.com>
Tue, 4 Mar 2025 22:02:40 +0000 (23:02 +0100)
src/libsystemd/sd-journal/journal-send.c

index 93f9fc9df02fba50674e79d59e55461927f8ef77..d55ca86b18d1f75aab5508830f7f8fe6880bb1a8 100644 (file)
@@ -88,7 +88,7 @@ void close_journal_fd(void) {
         if (!RUNNING_ON_VALGRIND)
                 return;
 
-        if (getpid_cached() != gettid())
+        if (!is_main_thread())
                 return;
 
         if (fd_plus_one <= 0)