Lines Matching defs:pid
45 pid_t pid = -1;
54 pid = sys_clone3(&args, sizeof(args));
55 if (pid < 0) {
61 if (pid == 0) {
96 if (expected_pid == 0 || expected_pid == pid) {
97 ksft_print_msg("I am the parent (%d). My child's pid is %d\n",
98 getpid(), pid);
101 "Expected child pid %d does not match actual pid %d\n",
102 expected_pid, pid);
106 if (waitpid(pid, &status, 0) < 0) {
151 pid_t pid, ns1, ns2, ns3, ns_pid;
270 pid = fork();
271 if (pid == 0) {
275 if (waitpid(pid, &status, 0) < 0)
276 ksft_exit_fail_msg("Waiting for child %d failed", pid);
279 set_tid[0] = pid;
289 * PID namespace and PID 'pid' in the parent PID namespace. This
293 set_tid[1] = pid;
295 set_tid, 2, CLONE_NEWPID, 0, pid, 0);
302 set_tid[0] = pid;
312 * This and the next test cases check that all pid-s are
321 set_tid[1] = pid;
332 set_tid[2] = pid;
339 set_tid[2] = pid;
350 * something like 'NSpid: pid 42 1'.
365 snprintf(proc_path, sizeof(proc_path), "/proc/%d/status", pid);
408 ksft_print_msg("Expecting PIDs %d, 42, 1\n", pid);
410 ksft_test_result(ns3 == pid && ns2 == 42 && ns1 == 1,