• Home
  • Raw
  • Download

Lines Matching refs:pid

36     if (!pid.has_value()) return;  in ~CommandResult()
37 if (*pid == 0) { in ~CommandResult()
42 ALOGE_IF(kill(*pid, SIGKILL) != 0, "kill(%d): %s", *pid, strerror(errno)); in ~CommandResult()
44 while (pid.has_value()) { in ~CommandResult()
46 LOG_HOST("%s: Waiting for PID %d to exit.", __PRETTY_FUNCTION__, *pid); in ~CommandResult()
47 int waitres = waitpid(*pid, &status, 0); in ~CommandResult()
49 ALOGE("%s: waitpid(%d): %s", __PRETTY_FUNCTION__, *pid, strerror(errno)); in ~CommandResult()
53 LOG_HOST("%s: PID %d exited.", __PRETTY_FUNCTION__, *pid); in ~CommandResult()
54 pid.reset(); in ~CommandResult()
56 LOG_HOST("%s: PID %d terminated by signal %d.", __PRETTY_FUNCTION__, *pid, in ~CommandResult()
58 pid.reset(); in ~CommandResult()
60 ALOGW("%s: pid %d stopped", __PRETTY_FUNCTION__, *pid); in ~CommandResult()
62 ALOGW("%s: pid %d continued", __PRETTY_FUNCTION__, *pid); in ~CommandResult()
70 if (res.pid) os << ", pid=" << *res.pid; in operator <<()
100 int pid = fork(); in execute() local
101 if (pid == -1) { in execute()
105 if (pid == 0) { in execute()
124 ret.pid = pid; in execute()
173 while (ret.pid.has_value()) { in execute()
175 auto exitPid = waitpid(pid, &status, 0); in execute()
177 PLOGE("waitpid(%d)", pid); in execute()
180 if (exitPid == pid) { in execute()
182 ret.pid = std::nullopt; in execute()
185 ret.pid = std::nullopt; in execute()
188 ALOGW("%s: pid %d stopped", __PRETTY_FUNCTION__, *ret.pid); in execute()
190 ALOGW("%s: pid %d continued", __PRETTY_FUNCTION__, *ret.pid); in execute()