| 48 | } |
| 49 | |
| 50 | void 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 | |
| 66 | void test_read_all() |
| 67 | { |