Lines Matching refs:rc
50 int rc; in ATF_TC_BODY() local
54 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
55 ATF_CHECK_EQ(-1, rc); in ATF_TC_BODY()
60 rc = procctl(8888, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
61 ATF_CHECK_EQ(-1, rc); in ATF_TC_BODY()
66 rc = procctl(P_PID, (((getpid() + 1) % 10) + 100), in ATF_TC_BODY()
68 ATF_CHECK_EQ(-1, rc); in ATF_TC_BODY()
73 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, NULL); in ATF_TC_BODY()
74 ATF_CHECK_EQ(-1, rc); in ATF_TC_BODY()
79 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
80 ATF_CHECK_EQ(0, rc); in ATF_TC_BODY()
84 rc = procctl(P_PID, getpid(), PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
85 ATF_CHECK_EQ(0, rc); in ATF_TC_BODY()
89 rc = procctl(P_PID, 0, PROC_PDEATHSIG_STATUS, &signum); in ATF_TC_BODY()
90 ATF_CHECK_EQ(0, rc); in ATF_TC_BODY()
99 int rc; in ATF_TC_BODY() local
103 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
105 rc = fork(); in ATF_TC_BODY()
106 ATF_REQUIRE(rc != -1); in ATF_TC_BODY()
107 if (rc == 0) { in ATF_TC_BODY()
110 rc = procctl(P_PID, 0, PROC_PDEATHSIG_STATUS, &signum); in ATF_TC_BODY()
111 assert(rc == 0); in ATF_TC_BODY()
117 waitpid(rc, &status, 0); in ATF_TC_BODY()
125 int rc; in ATF_TC_BODY() local
127 rc = fork(); in ATF_TC_BODY()
128 ATF_REQUIRE(rc != -1); in ATF_TC_BODY()
129 if (rc == 0) { in ATF_TC_BODY()
139 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
140 assert(rc == 0); in ATF_TC_BODY()
143 rc = execl(exec_path, exec_path, NULL); in ATF_TC_BODY()
144 assert(rc == 0); in ATF_TC_BODY()
149 waitpid(rc, &status, 0); in ATF_TC_BODY()
158 int rc; in ATF_TC_BODY() local
163 rc = pipe(pipe_ca); in ATF_TC_BODY()
164 ATF_REQUIRE(rc == 0); in ATF_TC_BODY()
165 rc = pipe(pipe_cb); in ATF_TC_BODY()
166 ATF_REQUIRE(rc == 0); in ATF_TC_BODY()
168 rc = fork(); in ATF_TC_BODY()
169 ATF_REQUIRE(rc != -1); in ATF_TC_BODY()
170 if (rc == 0) { in ATF_TC_BODY()
171 rc = fork(); in ATF_TC_BODY()
172 assert(rc >= 0); in ATF_TC_BODY()
173 if (rc == 0) { in ATF_TC_BODY()
178 rc = sigfillset(&sigset); in ATF_TC_BODY()
179 assert(rc == 0); in ATF_TC_BODY()
180 rc = sigprocmask(SIG_SETMASK, &sigset, NULL); in ATF_TC_BODY()
181 assert(rc == 0); in ATF_TC_BODY()
187 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
188 assert(rc == 0); in ATF_TC_BODY()
191 rc = write(pipe_cb[1], ".", 1); in ATF_TC_BODY()
192 assert(rc == 1); in ATF_TC_BODY()
196 rc = sigwait(&sigset, &signum); in ATF_TC_BODY()
197 assert(rc == 0); in ATF_TC_BODY()
201 rc = write(pipe_ca[1], ".", 1); in ATF_TC_BODY()
202 assert(rc == 1); in ATF_TC_BODY()
209 rc = read(pipe_cb[0], &buffer, 1); in ATF_TC_BODY()
210 assert(rc == 1); in ATF_TC_BODY()
218 rc = read(pipe_ca[0], &buffer, 1); in ATF_TC_BODY()
219 ATF_CHECK_EQ(1, rc); in ATF_TC_BODY()
227 int rc; in ATF_TC_BODY() local
234 rc = pipe(pipe_ca); in ATF_TC_BODY()
235 ATF_REQUIRE(rc == 0); in ATF_TC_BODY()
236 rc = pipe(pipe_db); in ATF_TC_BODY()
237 ATF_REQUIRE(rc == 0); in ATF_TC_BODY()
238 rc = pipe(pipe_cd); in ATF_TC_BODY()
239 assert(rc == 0); in ATF_TC_BODY()
241 rc = fork(); in ATF_TC_BODY()
242 ATF_REQUIRE(rc != -1); in ATF_TC_BODY()
243 if (rc == 0) { in ATF_TC_BODY()
248 rc = fork(); in ATF_TC_BODY()
249 assert(rc >= 0); in ATF_TC_BODY()
250 if (rc == 0) { in ATF_TC_BODY()
255 rc = sigfillset(&sigset); in ATF_TC_BODY()
256 assert(rc == 0); in ATF_TC_BODY()
257 rc = sigprocmask(SIG_SETMASK, &sigset, NULL); in ATF_TC_BODY()
258 assert(rc == 0); in ATF_TC_BODY()
264 rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); in ATF_TC_BODY()
265 assert(rc == 0); in ATF_TC_BODY()
267 rc = write(pipe_cd[1], "x", 1); in ATF_TC_BODY()
268 assert(rc == 1); in ATF_TC_BODY()
272 rc = sigwait(&sigset, &signum); in ATF_TC_BODY()
273 assert(rc == 0); in ATF_TC_BODY()
277 rc = write(pipe_ca[1], ".", 1); in ATF_TC_BODY()
278 assert(rc == 1); in ATF_TC_BODY()
281 c_pid = rc; in ATF_TC_BODY()
285 rc = fork(); in ATF_TC_BODY()
286 assert(rc >= 0); in ATF_TC_BODY()
287 if (rc == 0) { in ATF_TC_BODY()
290 rc = ptrace(PT_ATTACH, c_pid, 0, 0); in ATF_TC_BODY()
291 assert(rc == 0); in ATF_TC_BODY()
297 rc = ptrace(PT_CONTINUE, c_pid, (caddr_t) 1, 0); in ATF_TC_BODY()
298 assert(rc == 0); in ATF_TC_BODY()
300 rc = read(pipe_cd[0], &buffer, 1); in ATF_TC_BODY()
301 assert(rc == 1); in ATF_TC_BODY()
304 rc = write(pipe_db[1], ".", 1); in ATF_TC_BODY()
305 assert(rc == 1); in ATF_TC_BODY()
311 rc = ptrace(PT_CONTINUE, c_pid, (caddr_t) 1, in ATF_TC_BODY()
313 assert(rc == 0); in ATF_TC_BODY()
323 rc = read(pipe_db[0], &buffer, 1); in ATF_TC_BODY()
324 assert(rc == 1); in ATF_TC_BODY()
333 rc = read(pipe_ca[0], &buffer, 1); in ATF_TC_BODY()
334 ATF_CHECK_EQ(1, rc); in ATF_TC_BODY()