MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetMaxFileDescriptor

Function GetMaxFileDescriptor

src/leveldb/util/env_posix_test.cc:78–83  ·  view source on GitHub ↗

File descriptors are small non-negative integers. Returns void so the implementation can use ASSERT_EQ.

Source from the content-addressed store, hash-verified

76//
77// Returns void so the implementation can use ASSERT_EQ.
78void GetMaxFileDescriptor(int* result_fd) {
79 // Get the maximum file descriptor number.
80 ::rlimit fd_rlimit;
81 ASSERT_EQ(0, ::getrlimit(RLIMIT_NOFILE, &fd_rlimit));
82 *result_fd = fd_rlimit.rlim_cur;
83}
84
85// Iterates through all possible FDs and returns the currently open ones.
86//

Callers 1

GetOpenFileDescriptorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected