Lines Matching refs:process

209    std::unique_ptr<IptablesProcess> *process =  in sendCommand()  local
220 IptablesProcess *existingProcess = process->get(); in sendCommand()
234 process->reset(newProcess); in sendCommand()
237 if (!android::base::WriteFully((*process)->stdIn, command.data(), command.length())) { in sendCommand()
242 if (!android::base::WriteFully((*process)->stdIn, PING, PING_SIZE)) { in sendCommand()
247 if (!drainAndWaitForAck(*process, command, output)) { in sendCommand()
255 void IptablesRestoreController::maybeLogStderr(const std::unique_ptr<IptablesProcess> &process, in maybeLogStderr() argument
257 if (process->errBuf.empty()) { in maybeLogStderr()
265 ALOGE("%s", process->errBuf.c_str()); in maybeLogStderr()
267 process->errBuf.clear(); in maybeLogStderr()
271 bool IptablesRestoreController::drainAndWaitForAck(const std::unique_ptr<IptablesProcess> &process, in drainAndWaitForAck() argument
278 poll(process->pollFds, ARRAY_SIZE(process->pollFds), POLL_TIMEOUT_MS)); in drainAndWaitForAck()
292 for (size_t i = 0; i < ARRAY_SIZE(process->pollFds); ++i) { in drainAndWaitForAck()
293 const struct pollfd &pollfd = process->pollFds[i]; in drainAndWaitForAck()
322 process->errBuf.append(buffer, size); in drainAndWaitForAck()
329 process->stop(); in drainAndWaitForAck()
335 if (!receivedAck && !process->processTerminated) { in drainAndWaitForAck()
336 ALOGE("Timed out waiting for response from iptables process %d", process->pid); in drainAndWaitForAck()
339 process->stop(); in drainAndWaitForAck()
342 maybeLogStderr(process, command); in drainAndWaitForAck()