Home
last modified time | relevance | path

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

12

/freebsd-14.2/crypto/openssh/
H A 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
134 pid = waitpid(child_pid, &status, WUNTRACED); in ssh_sandbox_parent()
147 box->child_pid = child_pid; 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()
197 debug3("%s: start child %ld", __func__, (long)child_pid); in ssh_sandbox_parent()
198 if (kill(box->child_pid, SIGCONT) != 0) in ssh_sandbox_parent()
199 fatal("%s: kill(%d, SIGCONT)", __func__, box->child_pid); in ssh_sandbox_parent()
[all …]
H A 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()
H A 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()
H A 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()
H A Dsandbox-capsicum.c49 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 Dsandbox-seccomp-filter.c433 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 Dplatform.c64 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-14.2/tools/regression/netinet/tcpsockclosebeforeaccept/
H A Dtcpsockclosebeforeaccept.c167 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()
187 child_pid = fork(); in main()
188 if (child_pid < 0) in main()
190 if (child_pid == 0) { in main()
191 child_pid = getpid(); in main()
[all …]
/freebsd-14.2/tools/regression/netinet/tcpsocktimewait/
H A Dtcpsocktimewait.c111 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-14.2/tools/regression/sysvshm/
H A Dshmtest.c61 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-14.2/tools/regression/netinet/tcpdrop/
H A Dtcpdrop.c203 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-14.2/tools/regression/sysvmsg/
H A Dmsgtest.c81 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-14.2/contrib/tcp_wrappers/
H A Dshell_cmd.c41 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-14.2/contrib/pf/pflogd/
H A Dprivsep.c50 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-14.2/usr.bin/su/
H A Dsu.c161 pid_t child_pid, child_pgrp, pid; in main() local
445 child_pid = fork(); in main()
446 switch (child_pid) { in main()
451 setpgid(child_pid, child_pid); in main()
453 tcsetpgrp(STDERR_FILENO, child_pid); in main()
456 while ((pid = waitpid(child_pid, &statusp, WUNTRACED)) != -1) { in main()
458 child_pgrp = getpgid(child_pid); in main()
463 child_pgrp = getpgid(child_pid); in main()
466 kill(child_pid, SIGCONT); in main()
/freebsd-14.2/contrib/llvm-project/lldb/source/Plugins/Process/NetBSD/
H A DNativeThreadNetBSD.cpp132 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 DNativeThreadNetBSD.h62 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 DNativeProcessNetBSD.cpp1033 void NativeProcessNetBSD::MonitorClone(::pid_t child_pid, bool is_vfork, in MonitorClone() argument
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_tid); in MonitorClone()
1083 parent_thread.SetStoppedByFork(child_pid, child_tid); in MonitorClone()
/freebsd-14.2/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/
H A DNativeThreadFreeBSD.cpp132 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 DNativeThreadFreeBSD.h65 void SetStoppedByFork(lldb::pid_t child_pid, lldb::tid_t child_tid);
66 void SetStoppedByVFork(lldb::pid_t child_pid, lldb::tid_t child_tid);
H A DNativeProcessFreeBSD.cpp965 void NativeProcessFreeBSD::MonitorClone(::pid_t child_pid, bool is_vfork, in MonitorClone() argument
968 LLDB_LOG(log, "fork, child_pid={0}", child_pid); in MonitorClone()
972 llvm::sys::RetryAfterSignal(-1, ::waitpid, child_pid, &status, 0); in MonitorClone()
973 if (wait_pid != child_pid) { in MonitorClone()
977 child_pid); in MonitorClone()
984 child_pid); in MonitorClone()
989 const auto siginfo_err = PtraceWrapper(PT_LWPINFO, child_pid, &info, sizeof(info)); in MonitorClone()
998 new NativeProcessFreeBSD(static_cast<::pid_t>(child_pid), m_terminal_fd, in MonitorClone()
1012 parent_thread.SetStoppedByVFork(child_pid, child_tid); in MonitorClone()
1014 parent_thread.SetStoppedByFork(child_pid, child_tid); in MonitorClone()
/freebsd-14.2/tools/regression/sysvsem/
H A Dsemtest.c60 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-14.2/contrib/googletest/googletest/src/
H A Dgtest-death-test.cc1062 void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } in set_child_pid() argument
1119 const pid_t child_pid = fork(); in AssumeRole() local
1120 GTEST_DEATH_TEST_CHECK_(child_pid != -1); in AssumeRole()
1121 set_child_pid(child_pid); in AssumeRole()
1122 if (child_pid == 0) { in AssumeRole()
1256 pid_t child_pid = -1; in ExecDeathTestSpawnChild() local
1327 child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); in ExecDeathTestSpawnChild()
1335 if (use_fork && (child_pid = fork()) == 0) { in ExecDeathTestSpawnChild()
1344 GTEST_DEATH_TEST_CHECK_(child_pid != -1); in ExecDeathTestSpawnChild()
1345 return child_pid; in ExecDeathTestSpawnChild()
[all …]
/freebsd-14.2/contrib/netbsd-tests/kernel/
H A Dt_sysv.c90 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-14.2/contrib/llvm-project/lldb/source/Target/
H A DStopInfo.cpp1270 StopInfoFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid) in StopInfoFork() argument
1271 : StopInfo(thread, child_pid), m_child_pid(child_pid), in StopInfoFork()
1304 StopInfoVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid) in StopInfoVFork() argument
1305 : StopInfo(thread, child_pid), m_child_pid(child_pid), in StopInfoVFork()
1417 lldb::pid_t child_pid, in CreateStopReasonFork() argument
1419 return StopInfoSP(new StopInfoFork(thread, child_pid, child_tid)); in CreateStopReasonFork()
1424 lldb::pid_t child_pid, in CreateStopReasonVFork() argument
1426 return StopInfoSP(new StopInfoVFork(thread, child_pid, child_tid)); in CreateStopReasonVFork()

12