/freebsd/crypto/openssh/ |
H A 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 …]
|
H A 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()
|
H A 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()
|
H A 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()
|
H A D | sandbox-capsicum.c | 49 pid_t child_pid; member 64 box->child_pid = 0; in ssh_sandbox_init() 123 ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) in ssh_sandbox_parent_preauth() argument 125 box->child_pid = child_pid; in ssh_sandbox_parent_preauth()
|
H A D | sandbox-seccomp-filter.c | 433 pid_t child_pid; member 447 box->child_pid = 0; in ssh_sandbox_init() 538 ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) in ssh_sandbox_parent_preauth() argument 540 box->child_pid = child_pid; in ssh_sandbox_parent_preauth()
|
H A D | platform.c | 64 platform_post_fork_parent(pid_t child_pid) in platform_post_fork_parent() argument 67 solaris_contract_post_fork_parent(child_pid); in platform_post_fork_parent()
|
/freebsd/tools/regression/netinet/tcpsockclosebeforeaccept/ |
H A D | tcpsockclosebeforeaccept.c | 167 pid_t child_pid, parent_pid; in main() local 173 child_pid = fork(); in main() 174 if (child_pid < 0) in main() 176 if (child_pid == 0) { in main() 177 child_pid = getpid(); in main() 181 tcp_client(child_pid, 0); in main() 182 (void)kill(child_pid, SIGTERM); in main() 187 child_pid = fork(); in main() 188 if (child_pid < 0) in main() 190 if (child_pid == 0) { in main() [all …]
|
/freebsd/tools/regression/netinet/tcpsocktimewait/ |
H A D | tcpsocktimewait.c | 111 pid_t child_pid, parent_pid; in main() local 157 child_pid = fork(); in main() 158 if (child_pid < 0) in main() 160 if (child_pid == 0) { in main() 161 child_pid = getpid(); in main() 162 tcp_server(child_pid, listen_fd); in main() 166 (void)kill(child_pid, SIGTERM); in main() 205 child_pid = fork(); in main() 206 if (child_pid < 0) in main() 208 if (child_pid == 0) { in main() [all …]
|
/freebsd/tools/regression/sysvshm/ |
H A D | shmtest.c | 61 static pid_t child_pid; variable 104 child_pid = getpid(); in main() 144 switch ((child_pid = fork())) { in main() 185 if (waitpid(child_pid, &cstatus, 0) != child_pid) in sigchld_handler() 216 if (child_pid != 0 && sender_shmid != -1) { in cleanup()
|
/freebsd/tools/regression/netinet/tcpdrop/ |
H A D | tcpdrop.c | 203 pid_t child_pid, parent_pid; in main() local 244 child_pid = fork(); in main() 245 if (child_pid < 0) in main() 247 if (child_pid == 0) { in main() 248 child_pid = getpid(); in main() 251 tcp_client(child_pid, port); in main()
|
/freebsd/tools/regression/sysvmsg/ |
H A D | msgtest.c | 81 pid_t child_pid; variable 122 child_pid = getpid(); in main() 154 switch ((child_pid = fork())) { in main() 221 if (waitpid(child_pid, &cstatus, 0) != child_pid) in sigchld_handler() 252 if (child_pid != 0 && sender_msqid != -1) { in cleanup()
|
/freebsd/contrib/tcp_wrappers/ |
H A D | shell_cmd.c | 41 int child_pid; in shell_cmd() local 49 switch (child_pid = fork()) { in shell_cmd() 57 while ((wait_pid = wait((int *) 0)) != -1 && wait_pid != child_pid) in shell_cmd()
|
/freebsd/usr.bin/su/ |
H A D | su.c | 148 pid_t child_pid, child_pgrp, pid; in main() local 432 child_pid = fork(); in main() 433 switch (child_pid) { in main() 438 setpgid(child_pid, child_pid); in main() 440 tcsetpgrp(STDERR_FILENO, child_pid); in main() 443 while ((pid = waitpid(child_pid, &statusp, WUNTRACED)) != -1) { in main() 445 child_pgrp = getpgid(child_pid); in main() 450 child_pgrp = getpgid(child_pid); in main() 453 kill(child_pid, SIGCONT); in main()
|
/freebsd/contrib/pf/pflogd/ |
H A D | privsep.c | 50 static volatile pid_t child_pid = -1; variable 89 child_pid = fork(); in priv_init() 90 if (child_pid < 0) in priv_init() 93 if (!child_pid) { in priv_init() 296 if (child_pid != -1) in sig_pass_to_chld() 297 kill(child_pid, sig); in sig_pass_to_chld()
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ |
H A D | NativeThreadFreeBSD.cpp | 132 void NativeThreadFreeBSD::SetStoppedByFork(lldb::pid_t child_pid, in SetStoppedByFork() argument 138 m_stop_info.details.fork.child_pid = child_pid; in SetStoppedByFork() 142 void NativeThreadFreeBSD::SetStoppedByVFork(lldb::pid_t child_pid, in SetStoppedByVFork() argument 148 m_stop_info.details.fork.child_pid = child_pid; in SetStoppedByVFork()
|
H A D | NativeThreadFreeBSD.h | 67 void SetStoppedByFork(lldb::pid_t child_pid, lldb::tid_t child_tid); 68 void SetStoppedByVFork(lldb::pid_t child_pid, lldb::tid_t child_tid);
|
H A D | NativeProcessFreeBSD.cpp | 994 void NativeProcessFreeBSD::MonitorClone(::pid_t child_pid, bool is_vfork, in MonitorClone() argument 997 LLDB_LOG(log, "fork, child_pid={0}", child_pid); in MonitorClone() 1001 llvm::sys::RetryAfterSignal(-1, ::waitpid, child_pid, &status, 0); in MonitorClone() 1002 if (wait_pid != child_pid) { in MonitorClone() 1006 child_pid); in MonitorClone() 1013 child_pid); in MonitorClone() 1018 const auto siginfo_err = PtraceWrapper(PT_LWPINFO, child_pid, &info, sizeof(info)); in MonitorClone() 1027 new NativeProcessFreeBSD(static_cast<::pid_t>(child_pid), m_terminal_fd, in MonitorClone() 1041 parent_thread.SetStoppedByVFork(child_pid, child_tid); in MonitorClone() 1043 parent_thread.SetStoppedByFork(child_pid, child_tid); in MonitorClone()
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/Process/NetBSD/ |
H A D | NativeThreadNetBSD.cpp | 132 void NativeThreadNetBSD::SetStoppedByFork(lldb::pid_t child_pid, in SetStoppedByFork() argument 138 m_stop_info.details.fork.child_pid = child_pid; in SetStoppedByFork() 142 void NativeThreadNetBSD::SetStoppedByVFork(lldb::pid_t child_pid, in SetStoppedByVFork() argument 148 m_stop_info.details.fork.child_pid = child_pid; in SetStoppedByVFork()
|
H A D | NativeThreadNetBSD.h | 62 void SetStoppedByFork(lldb::pid_t child_pid, lldb::tid_t child_tid); 63 void SetStoppedByVFork(lldb::pid_t child_pid, lldb::tid_t child_tid);
|
H A D | NativeProcessNetBSD.cpp | 1033 void NativeProcessNetBSD::MonitorClone(::pid_t child_pid, bool is_vfork, in MonitorClone() 1036 LLDB_LOG(log, "clone, child_pid={0}", child_pid); in MonitorClone() 1040 llvm::sys::RetryAfterSignal(-1, ::waitpid, child_pid, &status, 0); in MonitorClone() 1041 if (wait_pid != child_pid) { in MonitorClone() 1045 child_pid); in MonitorClone() 1052 child_pid); in MonitorClone() 1058 PtraceWrapper(PT_GET_SIGINFO, child_pid, &info, sizeof(info)); in MonitorClone() 1067 new NativeProcessNetBSD(static_cast<::pid_t>(child_pid), m_terminal_fd, in MonitorClone() 1081 parent_thread.SetStoppedByVFork(child_pid, child_ti in SaveCore() 1012 MonitorClone(::pid_t child_pid,bool is_vfork,NativeThreadNetBSD & parent_thread) MonitorClone() argument [all...] |
/freebsd/tools/regression/sysvsem/ |
H A D | semtest.c | 60 pid_t child_pid; variable 118 child_pid = getpid(); in main() 164 switch ((child_pid = fork())) { in main() 271 if (child_pid != 0 && sender_semid != -1) { in cleanup()
|
/freebsd/contrib/googletest/googletest/src/ |
H A D | gtest-death-test.cc | 1064 void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } in set_child_pid() argument 1121 const pid_t child_pid = fork(); in AssumeRole() local 1122 GTEST_DEATH_TEST_CHECK_(child_pid != -1); in AssumeRole() 1123 set_child_pid(child_pid); in AssumeRole() 1124 if (child_pid == 0) { in AssumeRole() 1258 pid_t child_pid = -1; in ExecDeathTestSpawnChild() local 1285 child_pid = spawn(args.argv[0], 0, nullptr, &inherit, args.argv, environ); in ExecDeathTestSpawnChild() 1329 child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); in ExecDeathTestSpawnChild() 1337 if (use_fork && (child_pid = fork()) == 0) { in ExecDeathTestSpawnChild() 1346 GTEST_DEATH_TEST_CHECK_(child_pid != -1); in ExecDeathTestSpawnChild() [all …]
|
/freebsd/contrib/netbsd-tests/kernel/ |
H A D | t_sysv.c | 90 pid_t child_pid; variable 239 switch ((child_pid = fork())) { in ATF_TC_BODY() 284 ATF_REQUIRE_EQ_MSG(wait_result, child_pid, "wait returned %d (%s)", in ATF_TC_BODY() 459 switch ((child_pid = fork())) { in ATF_TC_BODY() 664 switch ((child_pid = fork())) { in ATF_TC_BODY() 681 ATF_REQUIRE_EQ_MSG(wait_result, child_pid, "wait returned %d (%s)", in ATF_TC_BODY()
|
/freebsd/contrib/llvm-project/lldb/source/Target/ |
H A D | StopInfo.cpp | 1272 StopInfoFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid) in StopInfoFork() argument 1273 : StopInfo(thread, child_pid), m_child_pid(child_pid), in StopInfoFork() 1306 StopInfoVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid) in StopInfoVFork() argument 1307 : StopInfo(thread, child_pid), m_child_pid(child_pid), in StopInfoVFork() 1419 lldb::pid_t child_pid, in CreateStopReasonFork() argument 1421 return StopInfoSP(new StopInfoFork(thread, child_pid, child_tid)); in CreateStopReasonFork() 1426 lldb::pid_t child_pid, in CreateStopReasonVFork() argument 1428 return StopInfoSP(new StopInfoVFork(thread, child_pid, child_tid)); in CreateStopReasonVFork()
|