Lines Matching refs:pidfd

42 	int pidfd = -1, status = 0;  in TEST()  local
46 .pidfd = ptr_to_u64(&pidfd), in TEST()
56 pidfd = open("/proc/self", O_DIRECTORY | O_RDONLY | O_CLOEXEC); in TEST()
57 ASSERT_GE(pidfd, 0); in TEST()
59 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
61 EXPECT_EQ(close(pidfd), 0); in TEST()
62 pidfd = -1; in TEST()
64 pidfd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
65 ASSERT_GE(pidfd, 0); in TEST()
67 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
69 EXPECT_EQ(close(pidfd), 0); in TEST()
70 pidfd = -1; in TEST()
78 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
82 EXPECT_EQ(close(pidfd), 0); in TEST()
91 int pidfd = -1, status = 0; in TEST() local
95 .pidfd = ptr_to_u64(&pidfd), in TEST()
114 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WSTOPPED, NULL), 0); in TEST()
119 ASSERT_EQ(sys_pidfd_send_signal(pidfd, SIGCONT, NULL, 0), 0); in TEST()
121 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WCONTINUED, NULL), 0); in TEST()
126 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WUNTRACED, NULL), 0); in TEST()
131 ASSERT_EQ(sys_pidfd_send_signal(pidfd, SIGKILL, NULL, 0), 0); in TEST()
133 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL), 0); in TEST()
138 EXPECT_EQ(close(pidfd), 0); in TEST()
143 int pidfd, status = 0; in TEST() local
161 pidfd = sys_pidfd_open(getpid(), PIDFD_NONBLOCK); in TEST()
162 EXPECT_GE(pidfd, 0) { in TEST()
168 ret = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
171 EXPECT_EQ(close(pidfd), 0); in TEST()
181 pidfd = sys_pidfd_open(pid, PIDFD_NONBLOCK); in TEST()
182 EXPECT_GE(pidfd, 0) { in TEST()
188 flags = fcntl(pidfd, F_GETFL, 0); in TEST()
196 ret = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
205 ret = sys_waitid(P_PIDFD, pidfd, &info, WEXITED | WNOHANG, NULL); in TEST()
208 ASSERT_EQ(fcntl(pidfd, F_SETFL, (flags & ~O_NONBLOCK)), 0); in TEST()
210 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WSTOPPED, NULL), 0); in TEST()
215 ASSERT_EQ(sys_pidfd_send_signal(pidfd, SIGCONT, NULL, 0), 0); in TEST()
217 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL), 0); in TEST()
222 EXPECT_EQ(close(pidfd), 0); in TEST()