| /openbsd-src/gnu/llvm/lldb/tools/debugserver/source/ |
| H A D | DNB.h | 54 nub_process_t DNBProcessAttach(nub_process_t pid, struct timespec *timeout, 79 nub_bool_t DNBProcessResume(nub_process_t pid, 82 nub_bool_t DNBProcessHalt(nub_process_t pid) DNB_EXPORT; 83 nub_bool_t DNBProcessDetach(nub_process_t pid) DNB_EXPORT; 84 nub_bool_t DNBProcessSignal(nub_process_t pid, int signal) DNB_EXPORT; 85 nub_bool_t DNBProcessInterrupt(nub_process_t pid) DNB_EXPORT; 86 nub_bool_t DNBProcessKill(nub_process_t pid) DNB_EXPORT; 87 nub_bool_t DNBProcessSendEvent(nub_process_t pid, const char *event) DNB_EXPORT; 88 nub_size_t DNBProcessMemoryRead(nub_process_t pid, nub_addr_t addr, 90 uint64_t DNBProcessMemoryReadInteger(nub_process_t pid, nub_addr_t addr, [all …]
|
| H A D | DNB.cpp | 84 static nub_bool_t AddProcessToMap(nub_process_t pid, MachProcessSP &procSP) { in AddProcessToMap() argument 87 process_map->insert(std::make_pair(pid, procSP)); in AddProcessToMap() 111 static nub_bool_t GetProcessSP(nub_process_t pid, MachProcessSP &procSP) { in GetProcessSP() argument 114 ProcessMapIter pos = process_map->find(pid); in GetProcessSP() 162 const pid_t pid = (pid_t)death_event.ident; in kqueue_thread() local 163 const pid_t child_pid = waitpid(pid, &status, 0); in kqueue_thread() 179 if (child_pid == abs(pid)) { in kqueue_thread() 216 static bool spawn_kqueue_thread(pid_t pid) { in spawn_kqueue_thread() argument 222 DNBLogError("Could not get kqueue for pid = %i.", pid); in spawn_kqueue_thread() 228 EV_SET(®_event, pid, EVFILT_PROC, EV_ADD, in spawn_kqueue_thread() [all …]
|
| /openbsd-src/gnu/usr.bin/binutils/gdb/ |
| H A D | inf-ptrace.c | 49 pid_t pid, fpid; in inf_ptrace_follow_fork() local 61 pid = ptid_get_pid (ptid); in inf_ptrace_follow_fork() 64 if (ptrace (PT_GET_PROCESS_STATE, pid, in inf_ptrace_follow_fork() 74 detach_breakpoints (pid); in inf_ptrace_follow_fork() 79 if (ptrace (PT_DETACH, pid, (PTRACE_TYPE_ARG3)1, 0) == -1) in inf_ptrace_follow_fork() 84 inferior_ptid = pid_to_ptid (pid); in inf_ptrace_follow_fork() 109 inf_ptrace_him (int pid) in inf_ptrace_him() argument 118 target_acknowledge_created_inferior (pid); in inf_ptrace_him() 127 target_post_startup_inferior (pid_to_ptid (pid)); in inf_ptrace_him() 152 inf_ptrace_post_startup_inferior (ptid_t pid) in inf_ptrace_post_startup_inferior() argument [all …]
|
| H A D | hppah-nat.c | 539 pid_t pid = PIDGET (ptid); in child_pid_to_str() local 542 sprintf (buf, "process %d%c", pid, '\0'); in child_pid_to_str() 589 int pid; in child_wait() local 605 pid = ptrace_wait (inferior_ptid, &status); in child_wait() 613 if (pid == -1) in child_wait() 629 if (target_has_exited (pid, status, &exit_status)) in child_wait() 635 if (!target_thread_alive (pid_to_ptid (pid))) in child_wait() 638 return pid_to_ptid (pid); in child_wait() 641 if (hpux_has_forked (pid, &related_pid)) in child_wait() 644 if (pid == PIDGET (inferior_ptid)) in child_wait() [all …]
|
| H A D | pa64solib.h | 55 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \ argument 56 pa64_solib_create_catch_load_hook (pid, tempflag, filename, cond_string) 63 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \ argument 64 pa64_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string) 73 #define SOLIB_HAVE_LOAD_EVENT(pid) \ argument 74 pa64_solib_have_load_event (pid) 88 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \ argument 89 pa64_solib_loaded_library_pathname (pid) 98 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \ argument 99 pa64_solib_have_unload_event (pid) [all …]
|
| H A D | inftarg.c | 108 int pid; in child_wait() local 116 pid = wait (&status); in child_wait() 124 if (pid == -1) in child_wait() 140 if (target_has_exited (pid, status, &exit_status)) in child_wait() 146 if (!target_thread_alive (pid_to_ptid (pid))) in child_wait() 149 return pid_to_ptid (pid); in child_wait() 151 } while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */ in child_wait() 154 return pid_to_ptid (pid); in child_wait() 168 pid_t pid = PIDGET (ptid); in child_thread_alive() local 170 return (kill (pid, 0) != -1); in child_thread_alive() [all …]
|
| H A D | amd64bsd-nat.c | 46 int pid; in amd64bsd_fetch_inferior_registers() local 50 pid = ptid_get_lwp (inferior_ptid); in amd64bsd_fetch_inferior_registers() 51 if (pid == 0) in amd64bsd_fetch_inferior_registers() 52 pid = ptid_get_pid (inferior_ptid); in amd64bsd_fetch_inferior_registers() 58 if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) in amd64bsd_fetch_inferior_registers() 70 if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) in amd64bsd_fetch_inferior_registers() 83 int pid; in amd64bsd_store_inferior_registers() local 87 pid = ptid_get_lwp (inferior_ptid); in amd64bsd_store_inferior_registers() 88 if (pid == 0) in amd64bsd_store_inferior_registers() 89 pid = ptid_get_pid (inferior_ptid); in amd64bsd_store_inferior_registers() [all …]
|
| H A D | somsolib.h | 68 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \ argument 69 som_solib_create_catch_load_hook (pid, tempflag, filename, cond_string) 77 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \ argument 78 som_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string) 88 #define SOLIB_HAVE_LOAD_EVENT(pid) \ argument 89 som_solib_have_load_event (pid) 104 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \ argument 105 som_solib_loaded_library_pathname (pid) 115 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \ argument 116 som_solib_have_unload_event (pid) [all …]
|
| H A D | obsd-nat.c | 51 pid_t pid = ptid_get_pid (inferior_ptid); in obsd_find_new_threads() local 54 if (ptrace(PT_GET_THREAD_FIRST, pid, (caddr_t)&pts, sizeof pts) == -1) in obsd_find_new_threads() 59 ptid_t ptid = ptid_build (pid, pts.pts_tid, 0); in obsd_find_new_threads() 70 if (ptrace(PT_GET_THREAD_NEXT, pid, (caddr_t)&pts, sizeof pts) == -1) in obsd_find_new_threads() 78 pid_t pid; in obsd_wait() local 88 pid = waitpid (ptid_get_pid (ptid), &status, 0); in obsd_wait() 91 while (pid == -1 && errno == EINTR); in obsd_wait() 96 if (pid == -1) in obsd_wait() 109 if (!WIFSTOPPED (status) && pid != ptid_get_pid (inferior_ptid)) in obsd_wait() 110 pid = -1; in obsd_wait() [all …]
|
| H A D | i386v-nat.c | 128 i386_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw) in i386_insert_watchpoint() argument 130 return i386_insert_aligned_watchpoint (pid, addr, addr, len, rw); in i386_insert_watchpoint() 134 i386_insert_aligned_watchpoint (int pid, CORE_ADDR waddr, CORE_ADDR addr, in i386_insert_aligned_watchpoint() argument 160 return i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw); in i386_insert_aligned_watchpoint() 167 return i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw); in i386_insert_aligned_watchpoint() 171 return i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw); in i386_insert_aligned_watchpoint() 183 ptrace (6, pid, offsetof (struct user, u_debugreg[DR_CONTROL]), in i386_insert_aligned_watchpoint() 185 ptrace (6, pid, offsetof (struct user, u_debugreg[free_debug_register]), in i386_insert_aligned_watchpoint() 194 i386_insert_nonaligned_watchpoint (int pid, CORE_ADDR waddr, CORE_ADDR addr, in i386_insert_nonaligned_watchpoint() argument 216 rv = i386_insert_aligned_watchpoint (pid, waddr, addr, size, rw); in i386_insert_nonaligned_watchpoint() [all …]
|
| /openbsd-src/regress/lib/libc/sys/ |
| H A D | t_waitid.c | 73 pid_t pid; in ATF_TC_BODY() local 75 switch (pid = fork()) { in ATF_TC_BODY() 80 ATF_REQUIRE(pid > 0); in ATF_TC_BODY() 83 ATF_REQUIRE(waitid(P_PID, pid, &si, WEXITED) == 0); in ATF_TC_BODY() 85 ATF_REQUIRE(si.si_pid == pid); in ATF_TC_BODY() 104 pid_t pid; in ATF_TC_BODY() local 106 switch (pid = fork()) { in ATF_TC_BODY() 111 ATF_REQUIRE(pid > 0); in ATF_TC_BODY() 114 ATF_REQUIRE(kill(pid, SIGTERM) == 0); in ATF_TC_BODY() 115 ATF_REQUIRE(waitid(P_PID, pid, &si, WEXITED) == 0); in ATF_TC_BODY() [all …]
|
| /openbsd-src/gnu/usr.bin/perl/ext/IPC-Open3/t/ |
| H A D | IPC-Open3.t | 37 my ($pid, $reaped_pid); 42 $pid = open3 'WRITE', 'READ', 'ERROR', $perl, '-e', cmd_line(<<'EOF'); 47 cmp_ok($pid, '!=', 0); 54 $reaped_pid = waitpid $pid, 0; 55 is($reaped_pid, $pid); 59 $pid = open3 'WRITE', 'READ', 'READ', $perl, '-e', cmd_line(<<'EOF'); 68 waitpid $pid, 0; 71 $pid = open3 'WRITE', 'READ', '', $perl, '-e', cmd_line(<<'EOF'); 80 waitpid $pid, 0; 83 $pid = open3 '<&PIPE_READ', 'READ', '', [all …]
|
| /openbsd-src/sys/dev/pci/drm/amd/amdkfd/ |
| H A D | kfd_smi_events.c | 42 pid_t pid; member 162 static bool kfd_smi_ev_enabled(pid_t pid, struct kfd_smi_client *client, in kfd_smi_ev_enabled() argument 168 if (pid && client->pid != pid && !(client->suser && (events & all))) in kfd_smi_ev_enabled() 174 static void add_event_to_kfifo(pid_t pid, struct kfd_node *dev, in add_event_to_kfifo() argument 182 if (!kfd_smi_ev_enabled(pid, client, smi_event)) in add_event_to_kfifo() 199 static void kfd_smi_event_add(pid_t pid, struct kfd_node *dev, in kfd_smi_event_add() argument 215 add_event_to_kfifo(pid, dev, event, fifo_in, len); in kfd_smi_event_add() 246 if (!task_info.pid) in kfd_smi_event_update_vmfault() 250 task_info.pid, task_info.task_name); in kfd_smi_event_update_vmfault() 253 void kfd_smi_event_page_fault_start(struct kfd_node *node, pid_t pid, in kfd_smi_event_page_fault_start() argument [all …]
|
| /openbsd-src/regress/sys/kern/futex/ |
| H A D | futex.c | 47 pid_t pid; in main() local 91 pid = fork(); in main() 92 assert(pid != -1); in main() 93 if (pid == 0) { in main() 99 assert(waitpid(pid, &status, 0) == pid); in main() 106 pid = fork(); in main() 107 assert(pid != -1); in main() 108 if (pid == 0) { in main() 119 assert(waitpid(pid, &status, 0) == pid); in main() 133 pid = fork(); in main() [all …]
|
| /openbsd-src/gnu/usr.bin/perl/t/op/ |
| H A D | fork.t | 284 if ($pid = fork) { 285 waitpid($pid,0); 301 if ($pid = fork) { 302 waitpid($pid,0); 324 if ($pid = fork) { 337 if (eval q{$pid = fork}) { 368 my $pid = fork(); 369 die "fork() failed: $!" unless defined $pid; 370 close($pid ? $child : $parent); 371 $pid; [all …]
|
| H A D | kill0.t | 27 for my $pid (1 .. $total) { 28 ++$count if kill(0, $pid); 42 my ($pid, $name) = @$case; 43 eval { kill 0, $pid }; 74 my $pid = system(1, $^X, 'op/kill0_child', $killfile); 75 die 'PID is 0' if !$pid; 82 is(kill('-KILL', $pid), 1, 'process group kill, named signal'); 102 $pid = system(1, $^X, 'op/kill0_child', $killfile); 103 die 'PID is 0' if !$pid; 107 is(kill(-$signo{KILL}, $pid), 1, 'process group kill, numeric signal');
|
| /openbsd-src/usr.bin/mail/ |
| H A D | popen.c | 46 pid_t pid; member 52 pid_t pid; member 102 pid_t pid; in Popen() local 119 pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); in Popen() 120 if (pid < 0) { in Popen() 127 register_file(fp, 1, pid); in Popen() 161 register_file(FILE *fp, int pipe, pid_t pid) in register_file() argument 169 fpp->pid = pid; in register_file() 195 return(p->pid); in file_pid() 211 pid_t pid; in start_commandv() local [all …]
|
| /openbsd-src/gnu/usr.bin/perl/dist/IO/lib/IO/ |
| H A D | Pipe.pm | 46 my $pid = $do_spawn ? 0 : fork(); 48 if($pid) { # Parent 49 return $pid; 51 elsif(defined $pid) { # Child or spawn 73 $pid = eval { system 1, @_ }; # 1 == P_NOWAIT 78 croak "IO::Pipe: Cannot spawn-NOWAIT: $err" if not $pid or $pid < 0; 79 return $pid; 100 my $pid; 101 $pid [all...] |
| /openbsd-src/regress/sys/kern/flock/ |
| H A D | flock.c | 55 safe_kill(pid_t pid, int sig) in safe_kill() argument 62 status = kill(pid, sig); in safe_kill() 111 int pid; in test2() local 125 pid = fork(); in test2() 126 if (pid < 0) in test2() 129 if (pid == 0) { in test2() 156 safe_kill(pid, SIGTERM); in test2() 157 safe_waitpid(pid); in test2() 182 int pid; in test3() local 196 pid = fork(); in test3() [all …]
|
| /openbsd-src/lib/libc/gen/ |
| H A D | popen.c | 47 static struct pid { struct 48 struct pid *next; argument 50 pid_t pid; member 58 struct pid * volatile cur; in popen() 62 pid_t pid; in popen() local 70 if ((cur = malloc(sizeof(struct pid))) == NULL) in popen() 79 switch (pid = vfork()) { in popen() 89 struct pid *pcur; in popen() 125 cur->pid = pid; in popen() 150 struct pid *cur, *last; in pclose() [all …]
|
| /openbsd-src/gnu/llvm/lldb/examples/interposing/darwin/fd_interposing/ |
| H A D | FDInterposing.cpp | 320 const pid_t pid = getpid(); in get_interposed_pid() local 321 if (g_pid != pid) { in get_interposed_pid() 323 g_pid = pid; in get_interposed_pid() 326 get_process_fullpath(true), pid); in get_interposed_pid() 330 g_pid, get_process_fullpath(true), pid); in get_interposed_pid() 346 const pid_t pid = get_interposed_pid(); in get_logging_fd() local 448 const int pid = get_interposed_pid(); in backtrace_error() local 449 if (pid >= 0) { in backtrace_error() 452 log("\nerror: %s (pid=%i): ", get_process_fullpath(), pid); in backtrace_error() 528 const int pid = get_interposed_pid(); in socket$__interposed__() local [all …]
|
| /openbsd-src/regress/usr.sbin/syslogd/ |
| H A D | Proc.pm | 36 foreach my $pid (@pids) { 37 if (kill(TERM => $pid) != 1 and $!{EPERM}) { 38 push @perms, $pid; 88 defined(my $pid = fork()) 90 if ($pid) { 91 $CHILDREN{$pid} = 1; 92 $self->{pid} = $pid; 157 my $pid = $self->{pid} 159 my $kid = waitpid($pid, $flags); 166 delete $CHILDREN{$pid} if WIFEXITED($?) || WIFSIGNALED($?); [all …]
|
| /openbsd-src/usr.sbin/pkg_add/OpenBSD/PackageRepository/ |
| H A D | SCP.pm | 61 my $pid; 67 if (defined $pid) { 68 waitpid($pid, 0); 69 undef $pid; 72 $pid = fork(); 73 if (!defined $pid) { 76 if ($pid == 0) { 84 if (defined $pid) { 85 kill 1, $pid; 86 waitpid($pid, 0); [all …]
|
| /openbsd-src/gnu/usr.bin/cvs/lib/ |
| H A D | waitpid.c | 11 pid_t pid; member 36 pid_t waitpid (pid, status, options) in waitpid() argument 37 pid_t pid; in waitpid() 47 unreaped[0].pid = 0; 51 for (i = 0; unreaped[i].pid; i++) 52 if (unreaped[i].pid == pid) 55 while (unreaped[i].pid) 61 return pid; 72 if (p == 0 || p == -1 || p == pid) 77 unreaped[n-1].pid = p;
|
| /openbsd-src/gnu/llvm/lldb/source/Plugins/Process/gdb-remote/ |
| H A D | GDBRemoteCommunicationServerPlatform.cpp | 75 uint16_t port, lldb::pid_t pid) { in AssociatePortWithProcess() argument 78 pos->second = pid; in AssociatePortWithProcess() 94 lldb::pid_t pid) { in FreePortForProcess() argument 97 if (pair.second == pid) { in FreePortForProcess() 116 m_pending_gdb_server.pid = LLDB_INVALID_PROCESS_ID; in GDBRemoteCommunicationServerPlatform() 161 const lldb_private::Args &args, std::string hostname, lldb::pid_t &pid, in LaunchGDBServer() argument 212 pid = debugserver_launch_info.GetProcessID(); in LaunchGDBServer() 213 if (pid != LLDB_INVALID_PROCESS_ID) { in LaunchGDBServer() 215 m_spawned_pids.insert(pid); in LaunchGDBServer() 217 m_port_map.AssociatePortWithProcess(*port, pid); in LaunchGDBServer() [all …]
|