MCPcopy Create free account
hub / github.com/arun11299/cpp-subprocess / test_sleep

Function test_sleep

test/test_subprocess.cc:50–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void test_sleep()
51{
52 auto p = Popen({"sleep", "30"}, shell{true});
53
54 while (p.poll() == -1)
55 {
56 std::cout << "Waiting..." << std::endl;
57#ifdef __USING_WINDOWS__
58#else
59 sleep(1);
60#endif
61 }
62
63 std::cout << "Sleep ended: ret code = " << p.retcode() << std::endl;
64}
65
66void test_read_all()
67{

Callers

nothing calls this directly

Calls 3

PopenClass · 0.85
pollMethod · 0.80
retcodeMethod · 0.80

Tested by

no test coverage detected