diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-07-20 16:19:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-07-20 20:27:24 +0200 |
commit | df0ff127758809a45105893772de76082d12a26d (patch) | |
tree | 9deb3a960cf26b54beae6a0b60d376c6ba8efe9a /src/machine/machined.c | |
parent | process-util: add getpid_cached() as a caching wrapper for getpid() (diff) | |
download | systemd-df0ff127758809a45105893772de76082d12a26d.tar.xz systemd-df0ff127758809a45105893772de76082d12a26d.zip |
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/machine/machined.c')
-rw-r--r-- | src/machine/machined.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c index 8719e01de9..d8ddbec8b9 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -34,6 +34,7 @@ #include "label.h" #include "machine-image.h" #include "machined.h" +#include "process-util.h" #include "signal-util.h" Manager *manager_new(void) { @@ -398,7 +399,7 @@ int main(int argc, char *argv[]) { goto finish; } - log_debug("systemd-machined running as pid "PID_FMT, getpid()); + log_debug("systemd-machined running as pid "PID_FMT, getpid_cached()); sd_notify(false, "READY=1\n" @@ -406,7 +407,7 @@ int main(int argc, char *argv[]) { r = manager_run(m); - log_debug("systemd-machined stopped as pid "PID_FMT, getpid()); + log_debug("systemd-machined stopped as pid "PID_FMT, getpid_cached()); finish: manager_free(m); |