/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-hwbreak.c | 48 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/ |
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()
|
/external/llvm-project/lldb/source/Plugins/Process/Linux/ |
D | SingleStepCheck.cpp | 69 ::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/ |
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/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rand/ |
D | urandom_test.cc | 155 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, ®s)); in GetTrace() 270 ASSERT_EQ(0, ptrace(PTRACE_SETREGS, child_pid, nullptr, ®s)); in GetTrace() 273 ASSERT_EQ(0, ptrace(PTRACE_SYSCALL, child_pid, 0, 0)); in GetTrace() [all …]
|
/external/boringssl/src/crypto/fipsmodule/rand/ |
D | urandom_test.cc | 155 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, ®s)); in GetTrace() 270 ASSERT_EQ(0, ptrace(PTRACE_SETREGS, child_pid, nullptr, ®s)); in GetTrace() 273 ASSERT_EQ(0, ptrace(PTRACE_SYSCALL, child_pid, 0, 0)); in GetTrace() [all …]
|
/external/ltp/testcases/kernel/syscalls/ptrace/ |
D | ptrace01.c | 67 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/ |
D | spawn.c | 127 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/ |
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/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/linux-kselftest/tools/testing/selftests/breakpoints/ |
D | breakpoint_test.c | 33 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/ |
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/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/capset/ |
D | capset04.c | 19 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()
|