glibc/sysdeps/unix/sysv/linux/sys
Adhemerval Zanella Netto e7190fc73d linux: Add pidfd_getpid
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>
2023-09-05 13:08:59 -03:00
..
acct.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
epoll.h Use __nonnull for the epoll_wait(2) family of syscalls 2023-06-01 14:50:42 -03:00
eventfd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fanotify.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fsuid.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
inotify.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
kd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
klog.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mount.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
pci.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
personality.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
pidfd.h linux: Add pidfd_getpid 2023-09-05 13:08:59 -03:00
prctl.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
procfs.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ptrace.h Add PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG etc. from Linux 6.4 to sys/ptrace.h 2023-08-08 14:38:22 +00:00
quota.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
raw.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
reboot.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
rseq.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
signalfd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
soundcard.h
swap.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
syscall.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sysinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
timerfd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
timex.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ttydefaults.h
user.h [BZ #6505] 2008-05-11 00:44:42 +00:00
vt.h