enhanced logging functions to be more error-resistent

This commit is contained in:
hyunghwan.chung
2017-05-12 04:15:09 +00:00
parent 9208d078b2
commit f5d311e825
4 changed files with 85 additions and 22 deletions

View File

@ -637,7 +637,11 @@ static int write_all (int fd, const char* ptr, moo_oow_t len)
#if defined(EWOULDBLOCK)
if (errno == EWOULDBLOCK) continue;
#endif
#endif
#if defined(EINTR)
/* TODO: would this interfere with non-blocking nature of this VM? */
if (errno == EINTR) continue;
#endif
return -1;
}