term_emit(): retry on EINTR/EBUSY

This commit is contained in:
nick black 2021-02-27 17:10:08 -05:00 committed by Nick Black
parent b93960cab1
commit a50c693657

View File

@ -566,7 +566,7 @@ term_emit(const char* seq, FILE* out, bool flush){
}
if(flush){
while(fflush(out) == EOF){
if(errno != EAGAIN){
if(errno != EAGAIN && errno != EINTR && errno != EBUSY){
fprintf(stderr, "Error flushing after %zub sequence (%s)\n", strlen(seq), strerror(errno));
return -1;
}