aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-01-27 14:44:15 +0100
committerDmitry Vyukov <dvyukov@google.com>2016-01-27 14:44:15 +0100
commit4997f546d28e2a02c6545be82194d42a90708ba8 (patch)
treec976551e746d8c8d1e905c4bda7ba3202fcabec1 /executor/executor.cc
parentd1163f04801795d9c4f1fbf8c5611719cefe5b7e (diff)
ipc: give executor some time to startup
Namespace-based sandbox can take some time to setup. In particular, lots of parallel executors block on net namespace creation.
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 56115f909..5136008c5 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -208,6 +208,11 @@ int main(int argc, char** argv)
void loop()
{
+ // Tell parent that we are ready to serve.
+ char tmp;
+ if (write(kOutPipeFd, &tmp, 1) != 1)
+ fail("control pipe write failed");
+
for (int iter = 0;; iter++) {
// Create a new private work dir for this test (removed at the end of the loop).
char cwdbuf[256];
@@ -215,7 +220,6 @@ void loop()
if (mkdir(cwdbuf, 0777))
fail("failed to mkdir");
- char tmp;
if (read(kInPipeFd, &tmp, 1) != 1)
fail("control pipe read failed");