Home | History | Annotate | Download | only in common

Lines Matching defs:Subprocess

17 #include "update_engine/common/subprocess.h"
54 if ((flags & Subprocess::kRedirectStderrToStdout) != 0) {
69 // Helper function to launch a process with the given Subprocess::Flags.
71 // The caller is responsible for watching the termination of the subprocess.
80 proc->SetSearchPath((flags & Subprocess::kSearchPath) != 0);
102 void Subprocess::Init(
112 Subprocess::~Subprocess() {
117 void Subprocess::OnStdoutReady(SubprocessRecord* record) {
136 void Subprocess::ChildExitedCallback(const siginfo_t& info) {
148 // Don't print any log if the subprocess exited with exit code 0.
150 LOG(INFO) << "Subprocess terminated with si_code " << info.si_code;
152 LOG(INFO) << "Subprocess exited with si_status: " << info.si_status;
156 LOG(INFO) << "Subprocess output:\n" << record->stdout;
171 pid_t Subprocess::Exec(const vector<string>& cmd,
176 pid_t Subprocess::ExecFlags(const vector<string>& cmd,
183 LOG(ERROR) << "Failed to launch subprocess";
189 &Subprocess::ChildExitedCallback,
193 // Capture the subprocess output. Make our end of the pipe non-blocking.
205 base::Bind(&Subprocess::OnStdoutReady, record.get()));
211 void Subprocess::KillExec(pid_t pid) {
217 // will be killed, SIGTERM might lead to leaked subprocess.
221 // Release the pid now so we don't try to kill it if Subprocess is destroyed
226 int Subprocess::GetPipeFd(pid_t pid, int fd) const {
233 bool Subprocess::SynchronousExec(const vector<string>& cmd,
245 bool Subprocess::SynchronousExecFlags(const vector<string>& cmd,
254 LOG(ERROR) << "Failed to launch subprocess";
276 // At this point, the subprocess already closed the output, so we only need to
284 bool Subprocess::SubprocessInFlight() {
292 Subprocess* Subprocess::subprocess_singleton_ = nullptr;