Lines Matching defs:pid

96 	pid_t pid;
106 pid = fork();
107 if (pid < 0)
111 if (pid == 0)
114 snprintf(buf, sizeof(buf), "/proc/%d", pid);
118 (void)wait_for_pid(pid);
155 const char *test_name = "pidfd_send_signal signal recycled pid";
167 ksft_test_result_skip("%s test: Unsharing pid namespace not permitted\n",
171 ksft_exit_fail_msg("%s test: Failed to unshare pid namespace\n",
191 /* pid 1 in new pid namespace */
207 /* grab pid PID_RECYCLE */
218 ksft_print_msg("pid to recycle is %d\n", pid2);
231 * able to grab pid PID_RECYCLE skip the test.
266 * recycled pid PID_RECYCLE.
277 * We have recycled the pid. Try to signal it. This
319 /* failed to recycle pid */
327 "%s test: Managed to signal recycled pid %d\n",
330 ksft_exit_fail_msg("%s test: Failed to recycle pid %d\n",
338 "%s test: Failed to signal recycled pid as expected\n",
383 ksft_print_msg("Child Thread: starting. pid %d tid %ld ; and sleeping\n",
389 ksft_print_msg("Child Thread: DONE. pid %d tid %ld\n",
429 ksft_print_msg("Child (pidfd): starting. pid %d tid %ld\n", getpid(),
442 int pid, pidfd = 0;
447 ksft_print_msg("Parent: pid: %d\n", getpid());
448 pid = pidfd_clone(CLONE_PIDFD, &pidfd, child_poll_exec_test);
449 if (pid < 0)
451 test_name, pid, errno);
453 ksft_print_msg("Parent: Waiting for Child (%d) to complete.\n", pid);
456 ret = waitpid(pid, &status, 0);
460 if (ret == pid)
480 ksft_print_msg("Child Thread: starting. pid %d tid %ld ; and sleeping\n",
483 ksft_print_msg("Child Thread: DONE. pid %d tid %ld\n", getpid(), syscall(SYS_gettid));
492 ksft_print_msg("Child: starting. pid %d tid %ld\n", getpid(), syscall(SYS_gettid));
508 int pid, pidfd = 0;
520 ksft_print_msg("Parent: pid: %d\n", getpid());
521 pid = pidfd_clone(CLONE_PIDFD, &pidfd, child_poll_leader_exit_test);
522 if (pid < 0)
524 test_name, pid, errno);
526 ksft_print_msg("Parent: Waiting for Child (%d) to complete.\n", pid);
529 ret = waitpid(pid, &status, 0);
542 if (ret == pid)