common: add pidfd related methods

Add functions to open pidfds, i.e. file descriptors representing
processes, for process ids and vice versa. Both functions work
an array of fds/pids, stop on error and return the number of
successfully handled items.
This commit is contained in:
Christian Kellner
2019-10-04 17:34:53 +02:00
parent 4b59818fd4
commit 5398dd1d19
4 changed files with 266 additions and 0 deletions

View File

@ -5,12 +5,14 @@ common_sources = [
'common-external.c',
'common-helpers.c',
'common-gpu.c',
'common-pidfds.c',
]
daemon_common = static_library(
'daemon-common',
sources: common_sources,
install: false,
include_directories: [config_h_dir]
)
link_daemon_common = declare_dependency(