Re: [PATCH v3 1/2] run-command: add new check_command helper

2013-04-07 Thread Junio C Hamano
Felipe Contreras writes: > - 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; > +

Re: [PATCH v3 1/2] run-command: add new check_command helper

2013-04-07 Thread Junio C Hamano
Felipe Contreras writes: > And to recover the information from the last run when running > wait_or_whine(). > > Signed-off-by: Felipe Contreras > --- The above says what the updated wait_or_whine() does (it returns the state an earlier call to check_command() has already polled to determine), b

[PATCH v3 1/2] run-command: add new check_command helper

2013-04-07 Thread Felipe Contreras
And to recover the information from the last run when running wait_or_whine(). Signed-off-by: Felipe Contreras --- run-command.c | 46 -- run-command.h | 5 + 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/run-command.c b/run-comm