summaryrefslogtreecommitdiff
path: root/src/shared/pager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-07-20 16:19:18 +0200
committerLennart Poettering <lennart@poettering.net>2017-07-20 20:27:24 +0200
commitdf0ff127758809a45105893772de76082d12a26d (patch)
tree9deb3a960cf26b54beae6a0b60d376c6ba8efe9a /src/shared/pager.c
parent5c30a6d2b805ae9b5dd0ad003b9ee86b8965bc47 (diff)
downloadsystemd-df0ff127758809a45105893772de76082d12a26d.tar.gz
tree-wide: make use of getpid_cached() wherever we can
This moves pretty much all uses of getpid() over to getpid_raw(). I didn't specifically check whether the optimization is worth it for each replacement, but in order to keep things simple and systematic I switched over everything at once.
Diffstat (limited to 'src/shared/pager.c')
-rw-r--r--src/shared/pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c
index 4d7b02c63c..ad48652527 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
@@ -87,7 +87,7 @@ int pager_open(bool no_pager, bool jump_to_end) {
if (pipe(fd) < 0)
return log_error_errno(errno, "Failed to create pager pipe: %m");
- parent_pid = getpid();
+ parent_pid = getpid_cached();
pager_pid = fork();
if (pager_pid < 0)