17 #ifndef _UTIL_IO_REDIRECTOR_H_
18 #define _UTIL_IO_REDIRECTOR_H_
35 enum { bufSize = 1024 };
44 std::string get_output(
bool blocking =
false);
52 enum PIPES { READ, WRITE };
58 void copy_fd_to(
int src_fd,
int destfd);
59 void close_fd(
int& fd);
66 std::string m_captured;
allows to capture the strings written to std::cout and std::cerr (MT-safe)