Use an interrupt-safe close()

This commit is contained in:
Kovid Goyal
2019-07-05 14:39:07 +05:30
parent 547132131a
commit c848c3ee0d
6 changed files with 25 additions and 23 deletions
+2
View File
@@ -311,3 +311,5 @@ void play_canberra_sound(const char *which_sound, const char *event_id);
#endif
SPRITE_MAP_HANDLE alloc_sprite_map(unsigned int, unsigned int);
SPRITE_MAP_HANDLE free_sprite_map(SPRITE_MAP_HANDLE);
static inline void safe_close(int fd) { while(close(fd) != 0 && errno == EINTR); }