MCPcopy Create free account
hub / github.com/Profactor/cv-plot / OutputRedirect

Method OutputRedirect

CvPlot/ext/catch2/inc/catch.hpp:11995–12002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11993 }
11994
11995 OutputRedirect::OutputRedirect(std::string& stdout_dest, std::string& stderr_dest) :
11996 m_originalStdout(dup(1)),
11997 m_originalStderr(dup(2)),
11998 m_stdoutDest(stdout_dest),
11999 m_stderrDest(stderr_dest) {
12000 dup2(fileno(m_stdoutFile.getFile()), 1);
12001 dup2(fileno(m_stderrFile.getFile()), 2);
12002 }
12003
12004 OutputRedirect::~OutputRedirect() {
12005 Catch::cout() << std::flush;

Callers

nothing calls this directly

Calls 1

getFileMethod · 0.80

Tested by

no test coverage detected