Lines Matching refs:handle
24 int WaitpidWithTimeout(ProcessHandle handle,
51 pid_t ret_pid = HANDLE_EINTR(waitpid(handle, &status, WNOHANG));
72 ret_pid = HANDLE_EINTR(waitpid(handle, &status, WNOHANG));
86 TerminationStatus GetTerminationStatusImpl(ProcessHandle handle,
90 const pid_t result = HANDLE_EINTR(waitpid(handle, &status,
93 DPLOG(ERROR) << "waitpid(" << handle << ")";
194 TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
195 return GetTerminationStatusImpl(handle, false /* can_block */, exit_code);
198 TerminationStatus WaitForTerminationStatus(ProcessHandle handle,
200 return GetTerminationStatusImpl(handle, true /* can_block */, exit_code);
203 bool WaitForExitCode(ProcessHandle handle, int* exit_code) {
205 if (HANDLE_EINTR(waitpid(handle, &status, 0)) == -1) {
220 bool WaitForExitCodeWithTimeout(ProcessHandle handle,
224 int status = WaitpidWithTimeout(handle, timeout.InMilliseconds(),
266 static bool WaitForSingleNonChildProcess(ProcessHandle handle,
268 DCHECK_GT(handle, 0);
279 EV_SET(&change, handle, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL);
287 DPLOG(ERROR) << "kevent (setup " << handle << ")";
327 DPLOG(ERROR) << "kevent (wait " << handle << ")";
330 DLOG(ERROR) << "kevent (wait " << handle << "): unexpected result "
342 event.ident != static_cast<uintptr_t>(handle)) {
343 DLOG(ERROR) << "kevent (wait " << handle
354 bool WaitForSingleProcess(ProcessHandle handle, base::TimeDelta wait) {
355 ProcessHandle parent_pid = GetParentProcessId(handle);
356 ProcessHandle our_pid = Process::Current().handle();
360 return WaitForSingleNonChildProcess(handle, wait);
362 // Currently on Linux we can't handle non child processes.
370 waitpid_success = (HANDLE_EINTR(waitpid(handle, &status, 0)) != -1);
373 handle, wait.InMilliseconds(), &waitpid_success);