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