From 4997f546d28e2a02c6545be82194d42a90708ba8 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Jan 2016 14:44:15 +0100 Subject: 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. --- executor/executor.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'executor/executor.cc') 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"); -- cgit mrf-deployment