Files
systemd/src/basic/pidfd-util.h
Lennart Poettering afede53ae9 pidfd-util: add helper for getting our own pidfdid
let's start caching our own pidfd id, since it's somewhat involved to
get but a much better identifier for things than the classic PID is.
2025-01-20 21:51:29 +01:00

22 lines
535 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdint.h>
#include <sys/types.h>
#include "missing_pidfd.h"
#include "missing_syscall.h"
int pidfd_get_namespace(int fd, unsigned long ns_type_cmd);
int pidfd_get_pid(int fd, pid_t *ret);
int pidfd_verify_pid(int pidfd, pid_t pid);
int pidfd_get_ppid(int fd, pid_t *ret);
int pidfd_get_uid(int fd, uid_t *ret);
int pidfd_get_cgroupid(int fd, uint64_t *ret);
int pidfd_get_inode_id(int fd, uint64_t *ret);
int pidfd_get_inode_id_self_cached(uint64_t *ret);