summaryrefslogtreecommitdiffstats
path: root/src/basic/process-util.h
diff options
context:
space:
mode:
authorNick Rosbrook <enr0n@ubuntu.com>2023-09-08 23:03:56 +0200
committerNick Rosbrook <enr0n@ubuntu.com>2023-10-13 21:13:11 +0200
commitade39d9ab849a6e8ae0f182a09e33b670463169c (patch)
treeb3c4d636d19bb3c3b3ef0cf48b6d845092cfd9a8 /src/basic/process-util.h
parentcoredump: store crashing process UID and GID in Context (diff)
downloadsystemd-ade39d9ab849a6e8ae0f182a09e33b670463169c.tar.xz
systemd-ade39d9ab849a6e8ae0f182a09e33b670463169c.zip
process-util: introduce namespace_get_leader helper
For a given PID and namespace type, this helper function gives the PID of the leader of the namespace containing the given PID. Use this in systemd-coredump instead of using the existing get_mount_namespace_leader. This helper will be used again in a later commit.
Diffstat (limited to 'src/basic/process-util.h')
-rw-r--r--src/basic/process-util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/process-util.h b/src/basic/process-util.h
index 8f87fdc2ae..7acc102f40 100644
--- a/src/basic/process-util.h
+++ b/src/basic/process-util.h
@@ -14,6 +14,7 @@
#include "alloc-util.h"
#include "format-util.h"
#include "macro.h"
+#include "namespace-util.h"
#include "time-util.h"
#define procfs_file_alloca(pid, field) \
@@ -53,6 +54,8 @@ int get_process_umask(pid_t pid, mode_t *ret);
int container_get_leader(const char *machine, pid_t *pid);
+int namespace_get_leader(pid_t pid, NamespaceType type, pid_t *ret);
+
int wait_for_terminate(pid_t pid, siginfo_t *status);
typedef enum WaitFlags {