MCPcopy Create free account
hub / github.com/apache/mesos / run_subprocess

Function run_subprocess

3rdparty/libprocess/src/tests/subprocess_tests.cpp:58–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58void run_subprocess(const lambda::function<Try<Subprocess>()>& createSubprocess)
59{
60 Try<Subprocess> s = createSubprocess();
61
62 ASSERT_SOME(s);
63
64 // Advance time until the internal reaper reaps the subprocess.
65 Clock::pause();
66 while (s->status().isPending()) {
67 Clock::advance(MAX_REAP_INTERVAL());
68 Clock::settle();
69 }
70 Clock::resume();
71
72 // Check process exited cleanly.
73 AWAIT_EXPECT_WEXITSTATUS_EQ(0, s->status());
74}
75
76
77// Calls subprocess, pipes output to an open file descriptor (and specifically

Callers 1

TEST_FFunction · 0.85

Calls 3

MAX_REAP_INTERVALFunction · 0.85
isPendingMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected