Lines Matching defs:Process
5 #include "base/process/process.h"
16 #include "base/process/kill.h"
32 // than |wait| for the process to exit. The child process may
38 // When a child process terminates a SIGCHLD signal is sent to the parent.
42 // Our strategy is to call waitpid() once up front to check if the process
64 // If the process hasn't exited yet, then sleep and try again.
72 // Sleep for a bit while we wait for the process to finish.
110 // If the process wasn't found, it must be dead.
217 Process::Process(ProcessHandle handle) : process_(handle) {
220 Process::~Process() {
223 Process::Process(Process&& other) : process_(other.process_) {
227 Process& Process::operator=(Process&& other) {
235 Process Process::Current() {
236 return Process(GetCurrentProcessHandle());
240 Process Process::Open(ProcessId pid) {
244 // On POSIX process handles are the same as PIDs.
245 return Process(pid);
249 Process Process::OpenWithExtraPrivileges(ProcessId pid) {
255 Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
257 return Process(handle);
262 bool Process::CanBackgroundProcesses() {
268 void Process::TerminateCurrentProcessImmediately(int exit_code) {
272 bool Process::IsValid() const {
276 ProcessHandle Process::Handle() const {
280 Process Process::Duplicate() const {
284 return Process(process_);
287 ProcessId Process::Pid() const {
292 bool Process::is_current() const {
296 void Process::Close() {
298 // if the process wasn't terminated (so we waited) or the state
304 bool Process::Terminate(int exit_code, bool wait) const {
321 // The process may not end immediately due to pending I/O
331 // The wait may fail with ECHILD if another process also waited for
332 // the same pid, causing the process state to get cleaned up.
336 DPLOG(ERROR) << "Error waiting for process " << process_;
352 DPLOG(ERROR) << "Unable to terminate process " << process_;
358 bool Process::WaitForExit(int* exit_code) const {
362 bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) const {
370 bool Process::IsProcessBackgrounded() const {
376 bool Process::SetProcessBackgrounded(bool value) {
378 // we were to lower the process priority we wouldn't be able to raise it back
385 int Process::GetPriority() const {