From 19b761a097041c2b7adb803fd755940ca2631f13 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 10 Aug 2020 16:33:02 +0200 Subject: tree-wide: getpid() → getpid_cached() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This doesn't really matter, but let's be systematic and prefer getpid_cached() in our codebase. --- src/basic/random-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/basic/random-util.c') diff --git a/src/basic/random-util.c b/src/basic/random-util.c index 98bcc7444c..9a7d3480c0 100644 --- a/src/basic/random-util.c +++ b/src/basic/random-util.c @@ -26,6 +26,7 @@ #include "missing_syscall.h" #include "missing_threads.h" #include "parse-util.h" +#include "process-util.h" #include "random-util.h" #include "sha256.h" #include "time-util.h" @@ -48,7 +49,7 @@ static void fallback_random_bytes(void *p, size_t n) { .call_id = fallback_counter++, .stamp_mono = now(CLOCK_MONOTONIC), .stamp_real = now(CLOCK_REALTIME), - .pid = getpid(), + .pid = getpid_cached(), .tid = gettid(), }; -- cgit v1.2.3