Lines Matching refs:pid
35 static bool WaitForRemote(pid_t pid, volatile bool* ready_ptr) { in WaitForRemote() argument
38 if (ptrace(PTRACE_ATTACH, pid, 0, 0) == 0) { in WaitForRemote()
39 unwindstack::TestQuiescePid(pid); in WaitForRemote()
41 unwindstack::MemoryRemote memory(pid); in WaitForRemote()
54 printf("Pid %d did not quiesce in a timely fashion.\n", pid); in WaitForRemote()
87 pid_t pid; in StartRemoteRun() local
88 if ((pid = fork()) == 0) { in StartRemoteRun()
92 if (pid == -1) { in StartRemoteRun()
96 if (!WaitForRemote(pid, &ready)) { in StartRemoteRun()
97 kill(pid, SIGKILL); in StartRemoteRun()
98 waitpid(pid, nullptr, 0); in StartRemoteRun()
102 return pid; in StartRemoteRun()
106 pid_t pid = StartRemoteRun(); in RemoteUnwind() local
107 if (pid == -1) { in RemoteUnwind()
110 unwindstack::TestScopedPidReaper reap(pid); in RemoteUnwind()
114 process_memory = unwindstack::Memory::CreateProcessMemoryCached(pid); in RemoteUnwind()
116 process_memory = unwindstack::Memory::CreateProcessMemory(pid); in RemoteUnwind()
118 unwindstack::RemoteMaps maps(pid); in RemoteUnwind()
124 std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::RemoteGet(pid)); in RemoteUnwind()
132 ptrace(PTRACE_DETACH, pid, 0, 0); in RemoteUnwind()