Lines Matching refs:pidfd
16 * ("fanotify: add pidfd support to the fanotify API").
27 #include "lapi/pidfd.h"
50 "return a valid pidfd for event created by self",
55 "return invalid pidfd for event created by terminated child",
65 static struct pidfd_fdinfo_t *read_pidfd_fdinfo(int pidfd)
72 SAFE_ASPRINTF(&fdinfo_path, "/proc/self/fdinfo/%d", pidfd);
113 int pidfd;
128 pidfd = SAFE_PIDFD_OPEN(getpid(), 0);
130 self_pidfd_fdinfo = read_pidfd_fdinfo(pidfd);
133 "pidfd=%d, failed to read pidfd fdinfo",
134 pidfd);
169 * Checks ensuring that pidfd information record object header
192 * Check if pidfd information object reported any errors during
195 if (info->pidfd < 0 && !tc->want_pidfd_err) {
197 "pidfd creation failed for pid: %u with pidfd error value "
200 info->pidfd);
203 info->pidfd != tc->want_pidfd_err) {
205 "pidfd set to an unexpected error: %d for pid: %u",
206 info->pidfd,
210 info->pidfd == tc->want_pidfd_err) {
212 "pid: %u terminated before pidfd was created, "
213 "pidfd set to the value of: %d, as expected",
220 * No pidfd errors occurred, continue with verifying pidfd
223 event_pidfd_fdinfo = read_pidfd_fdinfo(info->pidfd);
226 "reading fdinfo for pidfd: %d "
228 info->pidfd,
233 "pidfd provided for incorrect pid "
234 "(expected pidfd for pid: %u, got pidfd for "
242 "pidfd fdinfo values for self and event differ "
259 "got an event with a valid pidfd info record, "
261 "pidfd: %d, info_type: %d, info_len: %d",
265 info->pidfd,
275 if (info && info->pidfd >= 0)
276 SAFE_CLOSE(info->pidfd);