aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_runner.h
diff options
context:
space:
mode:
authorGreg Steuck <greg@nest.cx>2024-07-10 11:58:13 +0200
committerGreg Steuck <greg@nest.cx>2024-07-10 10:36:05 +0000
commit40f782db483d97f4dcc09fa7df468dd8d64d9b62 (patch)
treebdb459f648d5ab6cf086b550611d9805a049bfda /executor/executor_runner.h
parente7213be306a4b6eb76d4c0e34a1a99ebab5639ac (diff)
executor: retry read in case of known restartable errors
Diffstat (limited to 'executor/executor_runner.h')
-rw-r--r--executor/executor_runner.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/executor/executor_runner.h b/executor/executor_runner.h
index a688fa5e1..2ace905a7 100644
--- a/executor/executor_runner.h
+++ b/executor/executor_runner.h
@@ -403,7 +403,11 @@ private:
bool ReadResponse(bool out_of_requests)
{
uint32 status;
- ssize_t n = read(resp_pipe_, &status, sizeof(status));
+ ssize_t n;
+ while ((n = read(resp_pipe_, &status, sizeof(status))) == -1) {
+ if (errno != EINTR && errno != EAGAIN)
+ break;
+ }
if (n == 0) {
debug("proc %d: response pipe EOF\n", id_);
return false;