Re: [PATCH v3 1/2] run-command: add new check_command helper
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 9 quoted lines
> - while ((waiting = waitpid(pid, &status, 0)) < 0 && errno == EINTR)
> - ; /* nothing */
> + /* First try the last status from check_command() */
> + if (cmd && cmd->last_status.valid) {
> + status = cmd->last_status.status;
> + waiting = pid;
> + } else {
> + while ((waiting = waitpid(pid, status, 0)) < 0 && errno == EINTR)
> + ; /* nothing */waitpid(pid, &status, 0), I presume.