| 328 | #include <unistd.h> |
| 329 | |
| 330 | static bool fd_cloexec(int fd) { |
| 331 | int flags = fcntl(fd, F_GETFD); |
| 332 | return flags >= 0 && (flags & FD_CLOEXEC || fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == 0); |
| 333 | } |
| 334 | |
| 335 | static bool fd_regular_current_user(int fd, struct stat *status_out) { |
| 336 | struct stat status; |
no outgoing calls
no test coverage detected