MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / OutputRedirect

Method OutputRedirect

test/expected/catch.hpp:12013–12020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12011 }
12012
12013 OutputRedirect::OutputRedirect(std::string& stdout_dest, std::string& stderr_dest) :
12014 m_originalStdout(dup(1)),
12015 m_originalStderr(dup(2)),
12016 m_stdoutDest(stdout_dest),
12017 m_stderrDest(stderr_dest) {
12018 dup2(fileno(m_stdoutFile.getFile()), 1);
12019 dup2(fileno(m_stderrFile.getFile()), 2);
12020 }
12021
12022 OutputRedirect::~OutputRedirect() {
12023 Catch::cout() << std::flush;

Callers

nothing calls this directly

Calls 1

getFileMethod · 0.45

Tested by

no test coverage detected