MCPcopy Create free account
hub / github.com/apache/arrow / NewFileDescriptor

Method NewFileDescriptor

cpp/src/arrow/util/io_util_test.cc:177–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175class TestFileDescriptor : public ::testing::Test {
176 public:
177 Result<int> NewFileDescriptor() {
178 // Make a new fd by dup'ing C stdout (why not?)
179 int new_fd = dup(1);
180 if (new_fd < 0) {
181 return IOErrorFromErrno(errno, "Failed to dup() C stdout");
182 }
183 return new_fd;
184 }
185
186 void AssertValidFileDescriptor(int fd) {
187 ASSERT_FALSE(FileIsClosed(fd)) << "Not a valid file descriptor: " << fd;

Callers

nothing calls this directly

Calls 1

IOErrorFromErrnoFunction · 0.85

Tested by

no test coverage detected