Searched refs:procfd (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/samples/pidfd/ |
H A D | pidfd-metadata.c | 54 int procfd, ret; in pidfd_metadata_fd() local 58 procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC); in pidfd_metadata_fd() 59 if (procfd < 0) { in pidfd_metadata_fd() 76 close(procfd); in pidfd_metadata_fd() 77 procfd = -1; in pidfd_metadata_fd() 81 return procfd; in pidfd_metadata_fd() 89 int procfd, statusfd; in main() local 100 procfd = pidfd_metadata_fd(pid, pidfd); in main() 102 if (procfd < 0) in main() 105 statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC); in main() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | d_path.c | 43 int sockfd = -1, procfd = -1, devfd = -1; in trigger_fstat_events() local 57 procfd = open("/proc/self/comm", O_RDONLY); in trigger_fstat_events() 58 if (CHECK(procfd < 0, "trigger", "open /proc/self/comm failed\n")) in trigger_fstat_events() 81 ret = set_pathname(procfd, pid); in trigger_fstat_events() 98 fstat(procfd, &fileStat); in trigger_fstat_events() 112 close(procfd); in trigger_fstat_events()
|
/openbmc/linux/tools/testing/selftests/filesystems/ |
H A D | devpts_pts.c | 85 char procfd[4096]; in resolve_procfd_symlink() local 87 ret = snprintf(procfd, 4096, "/proc/self/fd/%d", fd); in resolve_procfd_symlink() 91 ret = readlink(procfd, buf, buflen); in resolve_procfd_symlink()
|