]> git.ipfire.org Git - thirdparty/systemd.git/commit
pidref: add pidref_verify() helper
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Sep 2023 14:22:29 +0000 (16:22 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Sep 2023 21:22:58 +0000 (23:22 +0200)
commitec8dc8353087a790aa4b8dc2c6aa565d0af418e2
tree424466c6456d0e993308ad70e6487c73916c94f8
parent9cb7e49f114d572027a80402f9266c47b06728f0
pidref: add pidref_verify() helper

This new helper can be used after reading process info from procfs, to
verify that the data that was just read actually matches the pidfd, and
does not belong to some new process that just reused the numeric PID of
the process we originally pinned.
src/basic/pidref.c
src/basic/pidref.h