/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/ |
D | 9-1.c | 98 static void kill_children(int *child_pid, int count) in kill_children() argument 103 kill(child_pid[i], SIGTERM); in kill_children() 104 free(child_pid); in kill_children() 109 int *child_pid, oldcount, newcount, shm_id, i; in main() local 126 child_pid = malloc(nb_cpu * sizeof(int)); in main() 156 child_pid[i] = fork(); in main() 157 if (child_pid[i] == -1) { in main() 159 kill_children(child_pid, i); in main() 161 } else if (child_pid[i] == 0) { in main() 170 child_pid[i] = fork(); in main() [all …]
|
D | 1-1.c | 46 int result, child_pid, tmp_errno, policy; in main() local 51 child_pid = fork(); in main() 52 if (child_pid == -1) { in main() 55 } else if (child_pid == 0) { in main() 59 if (sched_getparam(child_pid, ¶m) != 0) { in main() 61 kill(child_pid, SIGUSR1); in main() 80 result = sched_setparam(child_pid, ¶m); in main() 83 if (sched_getparam(child_pid, ¶m) != 0) { in main() 85 kill(child_pid, SIGUSR1); in main() 91 kill(child_pid, SIGUSR1); in main() [all …]
|
D | 2-2.c | 88 int *child_pid; in main() local 109 child_pid = malloc(nb_child * sizeof(int)); in main() 110 if (child_pid == NULL) { in main() 136 child_pid[i] = fork(); in main() 137 if (child_pid[i] == -1) { in main() 140 } else if (child_pid[i] == 0) { in main() 163 if (kill(child_pid[nb_child - 1], SIGTERM) != 0) { in main() 178 if (kill(child_pid[i], SIGKILL) != 0) { in main()
|
D | 27-1.c | 28 int result, child_pid, stat_loc; in main() local 36 child_pid = fork(); in main() 37 if (child_pid == -1) { in main() 40 } else if (child_pid == 0) { in main() 51 result = sched_setparam(child_pid, ¶m); in main()
|
D | 23-7.c | 25 int child_pid, stat_loc, old_priority; in main() local 34 child_pid = fork(); in main() 35 if (child_pid == -1) { in main() 38 } else if (child_pid == 0) { in main() 50 sched_setparam(child_pid, ¶m); in main()
|
D | 2-1.c | 87 int *child_pid; in main() local 108 child_pid = malloc(nb_child * sizeof(int)); in main() 132 child_pid[i] = fork(); in main() 133 if (child_pid[i] == -1) { in main() 136 } else if (child_pid[i] == 0) { in main() 159 if (kill(child_pid[nb_child - 1], SIGTERM) != 0) { in main() 174 if (kill(child_pid[i], SIGKILL) != 0) { in main()
|
/external/openssh/ |
D | sandbox-systrace.c | 95 pid_t child_pid; member 107 box->child_pid = 0; in ssh_sandbox_init() 124 ssh_sandbox_parent(struct ssh_sandbox *box, pid_t child_pid, in ssh_sandbox_parent() argument 132 debug3("%s: wait for child %ld", __func__, (long)child_pid); in ssh_sandbox_parent() 134 pid = waitpid(child_pid, &status, WUNTRACED); in ssh_sandbox_parent() 146 debug3("%s: child %ld stopped", __func__, (long)child_pid); in ssh_sandbox_parent() 147 box->child_pid = child_pid; in ssh_sandbox_parent() 158 if (ioctl(box->systrace_fd, STRIOCATTACH, &child_pid) == -1) in ssh_sandbox_parent() 160 box->systrace_fd, child_pid, strerror(errno)); in ssh_sandbox_parent() 171 policy.strp_pid = box->child_pid; in ssh_sandbox_parent() [all …]
|
D | sandbox-pledge.c | 41 pid_t child_pid; member 51 box->child_pid = 0; in ssh_sandbox_init() 71 ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) in ssh_sandbox_parent_preauth() argument 73 box->child_pid = child_pid; in ssh_sandbox_parent_preauth()
|
D | sandbox-rlimit.c | 40 pid_t child_pid; member 54 box->child_pid = 0; in ssh_sandbox_init() 91 ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) in ssh_sandbox_parent_preauth() argument 93 box->child_pid = child_pid; in ssh_sandbox_parent_preauth()
|
D | sandbox-darwin.c | 40 pid_t child_pid; member 54 box->child_pid = 0; in ssh_sandbox_init() 94 ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) in ssh_sandbox_parent_preauth() argument 96 box->child_pid = child_pid; in ssh_sandbox_parent_preauth()
|
D | sandbox-capsicum.c | 47 pid_t child_pid; member 62 box->child_pid = 0; in ssh_sandbox_init() 117 ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) in ssh_sandbox_parent_preauth() argument 119 box->child_pid = child_pid; in ssh_sandbox_parent_preauth()
|
/external/ltp/testcases/kernel/syscalls/ipc/msgrcv/ |
D | msgrcv07.c | 73 pid_t child_pid; in test_msg_except() local 89 child_pid = tst_fork(); in test_msg_except() 90 if (child_pid == -1) { in test_msg_except() 92 } else if (child_pid > 0) { in test_msg_except() 93 wait4child(child_pid, "MSG_EXCEPT"); in test_msg_except() 115 pid_t child_pid; in test_msg_noerror() local 127 child_pid = tst_fork(); in test_msg_noerror() 128 if (child_pid == -1) { in test_msg_noerror() 130 } else if (child_pid > 0) { in test_msg_noerror() 131 wait4child(child_pid, "MSG_NOERROR"); in test_msg_noerror()
|
/external/linux-kselftest/tools/testing/selftests/breakpoints/ |
D | breakpoint_test.c | 30 static pid_t child_pid; variable 43 ret = ptrace(PTRACE_POKEUSER, child_pid, in set_breakpoint_addr() 86 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, in toggle_breakpoint() 106 ret = ptrace(PTRACE_POKEUSER, child_pid, in toggle_breakpoint() 274 child_nr_tests = ptrace(PTRACE_PEEKDATA, child_pid, in check_success() 278 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) { in check_success() 296 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_instruction_breakpoints() 318 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints() 366 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() 370 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() [all …]
|
/external/ltp/testcases/kernel/syscalls/setpgid/ |
D | setpgid03.c | 52 int child_pid; in main() local 69 if ((child_pid = FORK_OR_VFORK()) == -1) in main() 72 if (child_pid == 0) { in main() 82 rval = setpgid(child_pid, getppid()); in main() 100 if ((child_pid = FORK_OR_VFORK()) == -1) in main() 103 if (child_pid == 0) { in main() 111 rval = setpgid(child_pid, getppid()); in main()
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/ |
D | 5-1.c | 27 int result = -1, child_pid; in main() local 31 child_pid = fork(); in main() 32 if (child_pid == -1) { in main() 35 } else if (child_pid == 0) { in main() 46 result = sched_getscheduler(child_pid); in main()
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/ |
D | 4-1.c | 28 int result = -1, child_pid; in main() local 32 child_pid = fork(); in main() 33 if (child_pid == -1) { in main() 36 } else if (child_pid == 0) { in main() 47 result = sched_getparam(child_pid, ¶m); in main()
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/ |
D | 21-1.c | 27 int result, child_pid, stat_loc; in main() local 33 child_pid = fork(); in main() 34 if (child_pid == -1) { in main() 37 } else if (child_pid == 0) { in main() 48 result = sched_setscheduler(child_pid, SCHED_FIFO, ¶m); in main()
|
D | 17-7.c | 34 int child_pid, stat_loc; in main() local 58 child_pid = fork(); in main() 59 if (child_pid == -1) { in main() 62 } else if (child_pid == 0) { in main() 73 sched_setscheduler(child_pid, policy, ¶m); in main()
|
/external/ltp/testcases/kernel/syscalls/capset/ |
D | capset02.c | 104 static pid_t child_pid = -1; variable 192 if (0 < child_pid) { in cleanup() 193 kill(child_pid, SIGTERM); in cleanup() 236 child_pid = FORK_OR_VFORK(); in test_setup() 237 if (child_pid == -1) in test_setup() 239 else if (child_pid == 0) { in test_setup() 249 header.pid = child_pid; in test_setup()
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/ |
D | 3-1.c | 29 int result = -2, child_pid, stat_loc; in main() local 40 child_pid = fork(); in main() 41 if (child_pid == -1) { in main() 44 } else if (child_pid == 0) { in main() 55 result = sched_rr_get_interval(child_pid, &interval); in main()
|
/external/ltp/testcases/kernel/syscalls/clone/ |
D | clone01.c | 45 int status, child_pid; in main() local 61 child_pid = wait(&status); in main() 62 if (child_pid == -1) in main() 66 if (TEST_RETURN == child_pid) in main() 70 TEST_RETURN, child_pid); in main()
|
D | clone07.c | 44 static int child_pid; variable 64 child_pid = ltp_clone(SIGCHLD, do_child, NULL, in main() 67 if (child_pid < 0) in main() 117 if (child_pid == 0) { in sigsegv_handler() 126 if (child_pid != 0) in sigusr2_handler()
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/fork/ |
D | 11-1.c | 67 pid_t child_pid; in main() local 88 child_pid = fork(); in main() 89 if (child_pid == -1) { in main() 94 if (child_pid == 0) in main() 97 if (waitpid(child_pid, &child_stat, 0) == -1) { in main()
|
/external/ltp/testcases/kernel/syscalls/ptrace/ |
D | ptrace02.c | 116 pid_t child_pid; in main() local 148 switch (child_pid = FORK_OR_VFORK()) { in main() 168 if ((waitpid(child_pid, &status, 0)) < 0) { in main() 186 if ((ptrace(PTRACE_CONT, child_pid, in main() 196 if ((waitpid(child_pid, &status, 0)) < 0) { in main()
|
D | ptrace01.c | 116 pid_t child_pid; in main() local 148 switch (child_pid = FORK_OR_VFORK()) { in main() 168 if ((waitpid(child_pid, &status, 0)) < 0) { in main() 186 if ((ptrace(PTRACE_KILL, child_pid, in main() 195 if ((waitpid(child_pid, &status, 0)) < 0) { in main()
|