Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | linux: Add pidfd_getpid | Adhemerval Zanella Netto | 2023-09-05 | 1 | -0/+47 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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> | ||||
* | Update copyright dates with scripts/update-copyrights | Joseph Myers | 2023-01-06 | 1 | -1/+1 |
| | |||||
* | Linux: Terminate subprocess on late failure in tst-pidfd (bug 29485) | Florian Weimer | 2022-08-15 | 1 | -2/+5 |
| | | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com> | ||||
* | tst-pidfd.c: UNSUPPORTED if we get EPERM on valid pidfd_getfd call | Mark Wielaard | 2022-07-29 | 1 | -0/+7 |
| | | | | | | | | pidfd_getfd can fail for a valid pidfd with errno EPERM for various reasons in a restricted environment. Use FAIL_UNSUPPORTED in that case. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com> | ||||
* | linux: Add tst-pidfd.c | Adhemerval Zanella | 2022-05-17 | 1 | -0/+172 |
To check for the pidfd functions pidfd_open, pidfd_getfd, pid_send_signal, and waitid with P_PIDFD. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com> |