Home
last modified time | relevance | path

Searched refs:child_pid (Results 1 – 25 of 123) sorted by relevance

12345

/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/
D9-1.c98 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 …]
D1-1.c46 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, &param) != 0) { in main()
61 kill(child_pid, SIGUSR1); in main()
80 result = sched_setparam(child_pid, &param); in main()
83 if (sched_getparam(child_pid, &param) != 0) { in main()
85 kill(child_pid, SIGUSR1); in main()
91 kill(child_pid, SIGUSR1); in main()
[all …]
D2-2.c88 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()
D27-1.c28 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, &param); in main()
D23-7.c25 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, &param); in main()
D2-1.c87 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/
Dsandbox-systrace.c95 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 …]
Dsandbox-pledge.c41 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()
Dsandbox-rlimit.c40 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()
Dsandbox-darwin.c40 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()
Dsandbox-capsicum.c47 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/
Dmsgrcv07.c73 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/
Dbreakpoint_test.c30 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/
Dsetpgid03.c52 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/
D5-1.c27 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/
D4-1.c28 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, &param); in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/
D21-1.c27 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, &param); in main()
D17-7.c34 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, &param); in main()
/external/ltp/testcases/kernel/syscalls/capset/
Dcapset02.c104 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/
D3-1.c29 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/
Dclone01.c45 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()
Dclone07.c44 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/
D11-1.c67 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/
Dptrace02.c116 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()
Dptrace01.c116 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()

12345