diff options
-rw-r--r-- | src/myfprintf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/myfprintf.c b/src/myfprintf.c index 0947531bb..42bc0049a 100644 --- a/src/myfprintf.c +++ b/src/myfprintf.c @@ -44,8 +44,13 @@ void blockingWrite(int fd, char * string) { while(len) { ret = write(fd,string,len); if(ret<0) { - if(errno==EAGAIN || errno==EINTR) continue; - return; + switch(errno) { + case EAGAIN: + case EINTR: + continue; + default: + return; + } } len-= ret; string+= ret; |