MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / OutputRedirect

Method OutputRedirect

Bcore/src/main/cpp/Dobby/tests/catch.hpp:8148–8152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8146}
8147
8148OutputRedirect::OutputRedirect(std::string &stdout_dest, std::string &stderr_dest)
8149 : m_originalStdout(dup(1)), m_originalStderr(dup(2)), m_stdoutDest(stdout_dest), m_stderrDest(stderr_dest) {
8150 dup2(fileno(m_stdoutFile.getFile()), 1);
8151 dup2(fileno(m_stderrFile.getFile()), 2);
8152}
8153
8154OutputRedirect::~OutputRedirect() {
8155 Catch::cout() << std::flush;

Callers

nothing calls this directly

Calls 1

getFileMethod · 0.80

Tested by

no test coverage detected