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

Method dup

extlibs/fmt/src/os.cc:247–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247file file::dup(int fd) {
248 // Don't retry as dup doesn't return EINTR.
249 // http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html
250 int new_fd = FMT_POSIX_CALL(dup(fd));
251 if (new_fd == -1)
252 FMT_THROW(system_error(errno, "cannot duplicate file descriptor {}", fd));
253 return file(new_fd);
254}
255
256void file::dup2(int fd) {
257 int result = 0;

Callers

nothing calls this directly

Calls 2

system_errorFunction · 0.85
fileClass · 0.85

Tested by

no test coverage detected