• Home
  • Raw
  • Download

Lines Matching refs:record

117 void Subprocess::OnStdoutReady(SubprocessRecord* record) {  in OnStdoutReady()  argument
124 record->stdout_fd, buf, arraysize(buf), &bytes_read, &eof); in OnStdoutReady()
125 record->stdout.append(buf, bytes_read); in OnStdoutReady()
129 MessageLoop::current()->CancelTask(record->stdout_task_id); in OnStdoutReady()
130 record->stdout_task_id = MessageLoop::kTaskIdNull; in OnStdoutReady()
140 SubprocessRecord* record = pid_record->second.get(); in ChildExitedCallback() local
143 OnStdoutReady(record); in ChildExitedCallback()
145 MessageLoop::current()->CancelTask(record->stdout_task_id); in ChildExitedCallback()
146 record->stdout_task_id = MessageLoop::kTaskIdNull; in ChildExitedCallback()
155 if (!record->stdout.empty()) { in ChildExitedCallback()
156 LOG(INFO) << "Subprocess output:\n" << record->stdout; in ChildExitedCallback()
158 if (!record->callback.is_null()) { in ChildExitedCallback()
159 record->callback.Run(info.si_status, record->stdout); in ChildExitedCallback()
165 record->proc.Release(); in ChildExitedCallback()
166 record->proc.Reset(0); in ChildExitedCallback()
180 unique_ptr<SubprocessRecord> record(new SubprocessRecord(callback)); in ExecFlags() local
182 if (!LaunchProcess(cmd, flags, output_pipes, &record->proc)) { in ExecFlags()
187 pid_t pid = record->proc.pid(); in ExecFlags()
192 record->stdout_fd = record->proc.GetPipe(STDOUT_FILENO); in ExecFlags()
194 int fd_flags = fcntl(record->stdout_fd, F_GETFL, 0) | O_NONBLOCK; in ExecFlags()
195 if (HANDLE_EINTR(fcntl(record->stdout_fd, F_SETFL, fd_flags)) < 0) { in ExecFlags()
197 << record->stdout_fd << "."; in ExecFlags()
200 record->stdout_task_id = MessageLoop::current()->WatchFileDescriptor( in ExecFlags()
202 record->stdout_fd, in ExecFlags()
205 base::Bind(&Subprocess::OnStdoutReady, record.get())); in ExecFlags()
207 subprocess_records_[pid] = std::move(record); in ExecFlags()