Implements Impala::Process::Manager. Definition at line 138 of file Manager4Posix.h. References mProcesses, SetExitCode(), and Impala::Process::Manager::STATE_RUNNING. Referenced by GetExitCode(), GetState(), IsTerminated(), and Kill(). 00139 { 00140 //Check only if we think it's still running 00141 if(mProcesses[pid].stateCode == STATE_RUNNING) 00142 { 00143 //Check if the process still exists 00144 int status; 00145 int ret=waitpid(pid, &status, WNOHANG); 00146 //ret will be 0 if process is running 00147 if(ret==0) 00148 return true; 00149 else 00150 { 00151 SetExitCode(pid,status,ret); 00152 return false; 00153 } 00154 } 00155 else//Already finished, and we have collected the exit code before 00156 return false; 00157 }
Here is the call graph for this function:
|