Lines Matching full:process
5 #include "base/process/process.h"
15 #include "base/process/kill.h"
30 // than |wait| for the process to exit. The child process may
36 // When a child process terminates a SIGCHLD signal is sent to the parent.
40 // Our strategy is to call waitpid() once up front to check if the process
62 // If the process hasn't exited yet, then sleep and try again.
70 // Sleep for a bit while we wait for the process to finish.
109 // 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() {
267 bool Process::IsValid() const {
271 ProcessHandle Process::Handle() const {
275 Process Process::Duplicate() const {
279 return Process(process_);
282 ProcessId Process::Pid() const {
287 bool Process::is_current() const {
291 void Process::Close() {
293 // if the process wasn't terminated (so we waited) or the state
299 bool Process::Terminate(int /* exit_code */, bool wait) const {
310 // The process may not end immediately due to pending I/O
320 // The wait may fail with ECHILD if another process also waited for
321 // the same pid, causing the process state to get cleaned up.
325 DPLOG(ERROR) << "Error waiting for process " << process_;
341 DPLOG(ERROR) << "Unable to terminate process " << process_;
347 bool Process::WaitForExit(int* exit_code) {
351 bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) {
356 bool Process::IsProcessBackgrounded() const {
362 bool Process::SetProcessBackgrounded(bool /*value*/) {
364 // to lower the process priority we wouldn't be able to raise it back to its
371 int Process::GetPriority() const {