| 48 | |
| 49 | struct DefaultCloser { |
| 50 | static void Close(int fd) { |
| 51 | // Even if close(2) fails with EINTR, the fd will have been closed. |
| 52 | // Using TEMP_FAILURE_RETRY will either lead to EBADF or closing someone |
| 53 | // else's fd. |
| 54 | // http://lkml.indiana.edu/hypermail/linux/kernel/0509.1/0877.html |
| 55 | ::close(fd); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | template <typename Closer> |
nothing calls this directly
no outgoing calls
no test coverage detected