#define _POSIX_C_SOURCE 1 #include #include void fermer(int fd) { for (;;) { errno = 0; if (close(fd) == -1 && errno == EINTR) continue; return; } }