diff options
author | Nick Rosbrook <enr0n@ubuntu.com> | 2023-09-08 23:03:56 +0200 |
---|---|---|
committer | Nick Rosbrook <enr0n@ubuntu.com> | 2023-10-13 21:13:11 +0200 |
commit | ade39d9ab849a6e8ae0f182a09e33b670463169c (patch) | |
tree | b3c4d636d19bb3c3b3ef0cf48b6d845092cfd9a8 /src/basic/process-util.h | |
parent | coredump: store crashing process UID and GID in Context (diff) | |
download | systemd-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.h | 3 |
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 { |