mirror of git://sourceware.org/git/glibc.git
This interface allows to obtain the associated process ID from the process file descriptor. It is done by parsing the procps fdinfo information. Its prototype is: pid_t pidfd_getpid (int fd) It returns the associated pid or -1 in case of an error and sets the errno accordingly. The possible errno values are those from open, read, and close (used on procps parsing), along with: - EBADF if the FD is negative, does not have a PID associated, or if the fdinfo fields contain a value larger than pid_t. - EREMOTE if the PID is in a separate namespace. - ESRCH if the process is already terminated. Checked on x86_64-linux-gnu on Linux 4.15 (no CLONE_PIDFD or waitid support), Linux 5.4 (full support), and Linux 6.2. Reviewed-by: Florian Weimer <fweimer@redhat.com> |
||
---|---|---|
.. | ||
bits | ||
sparc32 | ||
sparc64 | ||
sys | ||
Implies | ||
Makefile | ||
Versions | ||
a.out.h | ||
aio_cancel.c | ||
brk_call.h | ||
configure | ||
configure.ac | ||
dl-cache.h | ||
errlist-compat-data.h | ||
getrlimit64.c | ||
getshmlba.c | ||
kernel-features.h | ||
kernel_sigaction.h | ||
kernel_termios.h | ||
ldd-rewrite.sed | ||
librt-compat.c | ||
profil-counter.h | ||
readelflib.c | ||
rt-sysdep.c | ||
socket-constants-time64.h | ||
struct_kernel_shmid64_ds.h | ||
sysdep.c | ||
sysdep.h | ||
xstatver.h |