Home
last modified time | relevance | path

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

123456

/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/
Dptrace-hwbreak.c48 static void get_dbginfo(pid_t child_pid, struct ppc_debug_info *dbginfo) in get_dbginfo() argument
50 if (ptrace(PPC_PTRACE_GETHWDBGINFO, child_pid, NULL, dbginfo)) { in get_dbginfo()
190 static void check_success(pid_t child_pid, const char *name, const char *type, in check_success() argument
202 ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &siginfo); in check_success()
219 ptrace(PTRACE_SINGLESTEP, child_pid, NULL, 0); in check_success()
224 static void ptrace_set_debugreg(pid_t child_pid, unsigned long wp_addr) in ptrace_set_debugreg() argument
226 if (ptrace(PTRACE_SET_DEBUGREG, child_pid, 0, wp_addr)) { in ptrace_set_debugreg()
232 static int ptrace_sethwdebug(pid_t child_pid, struct ppc_hw_breakpoint *info) in ptrace_sethwdebug() argument
234 int wh = ptrace(PPC_PTRACE_SETHWDEBUG, child_pid, 0, info); in ptrace_sethwdebug()
243 static void ptrace_delhwdebug(pid_t child_pid, int wh) in ptrace_delhwdebug() argument
[all …]
/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()
/external/llvm-project/lldb/source/Plugins/Process/Linux/
DSingleStepCheck.cpp69 ::pid_t child_pid = fork(); in WorkaroundNeeded()
70 if (child_pid == -1) { in WorkaroundNeeded()
74 if (child_pid == 0) in WorkaroundNeeded()
77 ChildDeleter child_deleter{child_pid}; in WorkaroundNeeded()
79 if (sched_getaffinity(child_pid, sizeof available_cpus, &available_cpus) == in WorkaroundNeeded()
88 child_pid, &status, __WALL); in WorkaroundNeeded()
89 if (wpid != child_pid || !WIFSTOPPED(status)) { in WorkaroundNeeded()
103 if (sched_setaffinity(child_pid, sizeof cpus, &cpus) == -1) { in WorkaroundNeeded()
111 NativeProcessLinux::PtraceWrapper(PTRACE_SINGLESTEP, child_pid); in WorkaroundNeeded()
118 child_pid, &status, __WALL); in WorkaroundNeeded()
[all …]
/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/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rand/
Durandom_test.cc155 const int child_pid = fork(); in GetTrace() local
156 ASSERT_NE(-1, child_pid); in GetTrace()
158 if (child_pid == 0) { in GetTrace()
171 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in GetTrace()
179 ASSERT_EQ(0, ptrace(PTRACE_SETOPTIONS, child_pid, nullptr, in GetTrace()
189 ASSERT_EQ(0, ptrace(PTRACE_SYSCALL, child_pid, 0, 0)); in GetTrace()
190 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in GetTrace()
202 ASSERT_EQ(0, ptrace(PTRACE_GETREGS, child_pid, nullptr, &regs)); in GetTrace()
270 ASSERT_EQ(0, ptrace(PTRACE_SETREGS, child_pid, nullptr, &regs)); in GetTrace()
273 ASSERT_EQ(0, ptrace(PTRACE_SYSCALL, child_pid, 0, 0)); in GetTrace()
[all …]
/external/boringssl/src/crypto/fipsmodule/rand/
Durandom_test.cc155 const int child_pid = fork(); in GetTrace() local
156 ASSERT_NE(-1, child_pid); in GetTrace()
158 if (child_pid == 0) { in GetTrace()
171 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in GetTrace()
179 ASSERT_EQ(0, ptrace(PTRACE_SETOPTIONS, child_pid, nullptr, in GetTrace()
189 ASSERT_EQ(0, ptrace(PTRACE_SYSCALL, child_pid, 0, 0)); in GetTrace()
190 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in GetTrace()
202 ASSERT_EQ(0, ptrace(PTRACE_GETREGS, child_pid, nullptr, &regs)); in GetTrace()
270 ASSERT_EQ(0, ptrace(PTRACE_SETREGS, child_pid, nullptr, &regs)); in GetTrace()
273 ASSERT_EQ(0, ptrace(PTRACE_SYSCALL, child_pid, 0, 0)); in GetTrace()
[all …]
/external/ltp/testcases/kernel/syscalls/ptrace/
Dptrace01.c67 pid_t child_pid; in run() local
80 child_pid = SAFE_FORK(); in run()
82 if (!child_pid) in run()
85 SAFE_WAITPID(child_pid, &status, 0); in run()
90 else if ((ptrace(PTRACE_KILL, child_pid, 0, 0)) == -1) in run()
92 child_pid); in run()
94 SAFE_WAITPID(child_pid, &status, 0); in run()
/external/libwebsockets/lib/misc/
Dspawn.c127 if (lsp->child_pid < 1) in lws_spawn_reap()
133 n = waitid(P_PID, lsp->child_pid, &lsp->si, WEXITED | WNOHANG | WNOWAIT); in lws_spawn_reap()
135 lwsl_info("%s: child %d still running\n", __func__, lsp->child_pid); in lws_spawn_reap()
191 waitid(P_PID, lsp->child_pid, &lsp->si, WEXITED | WNOHANG); in lws_spawn_reap()
192 lsp->child_pid = -1; in lws_spawn_reap()
214 if (lsp->child_pid <= 0) in lws_spawn_piped_kill_child_process()
224 n = kill(-lsp->child_pid, SIGTERM); in lws_spawn_piped_kill_child_process()
226 lsp->child_pid, n, errno); in lws_spawn_piped_kill_child_process()
234 n = kill(lsp->child_pid, SIGTERM); in lws_spawn_piped_kill_child_process()
236 n = kill(lsp->child_pid, SIGPIPE); in lws_spawn_piped_kill_child_process()
[all …]
/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/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/linux-kselftest/tools/testing/selftests/breakpoints/
Dbreakpoint_test.c33 static pid_t child_pid; variable
46 ret = ptrace(PTRACE_POKEUSER, child_pid, in set_breakpoint_addr()
88 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, in toggle_breakpoint()
108 ret = ptrace(PTRACE_POKEUSER, child_pid, in toggle_breakpoint()
276 child_nr_tests = ptrace(PTRACE_PEEKDATA, child_pid, in check_success()
280 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) in check_success()
299 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_instruction_breakpoints()
321 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints()
377 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests()
381 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests()
[all …]
/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/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/capset/
Dcapset04.c19 static pid_t child_pid; variable
23 child_pid = SAFE_FORK(); in verify_capset()
24 if (!child_pid) in verify_capset()
27 header->pid = child_pid; in verify_capset()
40 SAFE_KILL(child_pid, SIGTERM); in verify_capset()

123456