MCPcopy Create free account
hub / github.com/MhmRdd/NoHello / RefersToSameFile

Method RefersToSameFile

module/src/main/cpp/external/fdutils/fd_utils.cpp:147–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147bool FileDescriptorInfo::RefersToSameFile() const {
148 struct stat f_stat;
149 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) {
150 return false;
151 }
152 return f_stat.st_ino == stat.st_ino && f_stat.st_dev == stat.st_dev;
153}
154
155void FileDescriptorInfo::Detach(fail_fn_t fail_fn) const {
156 const int dev_null_fd = TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR | O_CLOEXEC));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected