MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / dup2

Method dup2

extlibs/fmt/src/os.cc:256–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void file::dup2(int fd) {
257 int result = 0;
258 FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
259 if (result == -1) {
260 FMT_THROW(system_error(errno, "cannot duplicate file descriptor {} to {}",
261 fd_, fd));
262 }
263}
264
265void file::dup2(int fd, error_code& ec) FMT_NOEXCEPT {
266 int result = 0;

Callers

nothing calls this directly

Calls 2

system_errorFunction · 0.85
error_codeClass · 0.50

Tested by

no test coverage detected