Lines Matching full: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 ret = wait_for_pid(pid);
156 const char *test_name = "pidfd_send_signal signal recycled pid";
168 ksft_test_result_skip("%s test: Unsharing pid namespace not permitted\n",
172 ksft_exit_fail_msg("%s test: Failed to unshare pid namespace\n",
192 /* pid 1 in new pid namespace */
208 /* grab pid PID_RECYCLE */
219 ksft_print_msg("pid to recycle is %d\n", pid2);
232 * able to grab pid PID_RECYCLE skip the test.
267 * recycled pid PID_RECYCLE.
278 * We have recycled the pid. Try to signal it. This
320 /* failed to recycle pid */
328 "%s test: Managed to signal recycled pid %d\n",
331 ksft_exit_fail_msg("%s test: Failed to recycle pid %d\n",
339 "%s test: Failed to signal recycled pid as expected\n",
384 ksft_print_msg("Child Thread: starting. pid %d tid %ld ; and sleeping\n",
390 ksft_print_msg("Child Thread: DONE. pid %d tid %ld\n",
430 ksft_print_msg("Child (pidfd): starting. pid %d tid %ld\n", getpid(),
445 int pid, pidfd = 0;
450 ksft_print_msg("Parent: pid: %d\n", getpid());
451 pid = pidfd_clone(CLONE_PIDFD, &pidfd, child_poll_exec_test);
452 if (pid < 0)
454 test_name, pid, errno);
456 ksft_print_msg("Parent: Waiting for Child (%d) to complete.\n", pid);
459 ret = waitpid(pid, &status, 0);
463 if (ret == pid)
483 ksft_print_msg("Child Thread: starting. pid %d tid %ld ; and sleeping\n",
486 ksft_print_msg("Child Thread: DONE. pid %d tid %ld\n", getpid(), syscall(SYS_gettid));
495 ksft_print_msg("Child: starting. pid %d tid %ld\n", getpid(), syscall(SYS_gettid));
511 int pid, pidfd = 0;
523 ksft_print_msg("Parent: pid: %d\n", getpid());
524 pid = pidfd_clone(CLONE_PIDFD, &pidfd, child_poll_leader_exit_test);
525 if (pid < 0)
527 test_name, pid, errno);
529 ksft_print_msg("Parent: Waiting for Child (%d) to complete.\n", pid);
532 ret = waitpid(pid, &status, 0);
545 if (ret == pid)