Use EINTR safe wrappers for open() and shm_open()

This commit is contained in:
Kovid Goyal
2021-01-31 07:02:11 +05:30
parent 231f054bc3
commit d55fde9eea
8 changed files with 47 additions and 11 deletions
-6
View File
@@ -329,10 +329,4 @@ SPRITE_MAP_HANDLE alloc_sprite_map(unsigned int, unsigned int);
SPRITE_MAP_HANDLE free_sprite_map(SPRITE_MAP_HANDLE);
const char* get_hyperlink_for_id(const HYPERLINK_POOL_HANDLE, hyperlink_id_type id, bool only_url);
static inline void safe_close(int fd, const char* file UNUSED, const int line UNUSED) {
#if 0
printf("Closing fd: %d from file: %s line: %d\n", fd, file, line);
#endif
while(close(fd) != 0 && errno == EINTR);
}
void log_event(const char *format, ...) __attribute__((format(printf, 1, 2)));