| 145 | } |
| 146 | |
| 147 | bool 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 | |
| 155 | void FileDescriptorInfo::Detach(fail_fn_t fail_fn) const { |
| 156 | const int dev_null_fd = TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR | O_CLOEXEC)); |
nothing calls this directly
no outgoing calls
no test coverage detected