Commit af524c4d authored by Matt Johnston's avatar Matt Johnston
Browse files

Fix check for EINTR

parent 2bc9f350
......@@ -26,7 +26,7 @@ static int buf_writefile(buffer * buf, const char * filename) {
while (buf->pos != buf->len) {
int len = write(fd, buf_getptr(buf, buf->len - buf->pos),
buf->len - buf->pos);
if (errno == EINTR) {
if (len == -1 && errno == EINTR) {
continue;
}
if (len <= 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment