| 254 | } |
| 255 | |
| 256 | void 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 | |
| 265 | void file::dup2(int fd, error_code& ec) FMT_NOEXCEPT { |
| 266 | int result = 0; |
nothing calls this directly
no test coverage detected