Skip to content
Snippets Groups Projects
Commit 6afe2e84 authored by sof's avatar sof
Browse files

[project @ 1998-08-24 10:53:41 by sof]

readChunk:
  last commit may have fixed a bug in the handling of incomplete reads,
  but at the cost of breaking the (common) case of complete
  reads :-/. Should work better in both cases now.
parent 8f9cbd2d
No related merge requests found
......@@ -158,7 +158,7 @@ StgInt len;
while ((count = read(fd, p, len)) < len) {
if ( count == 0 ) { /* EOF */
return total_count;
break;
} else if ( count == -1 && errno == EAGAIN) {
errno = 0;
return FILEOBJ_BLOCKED_READ;
......@@ -172,6 +172,7 @@ StgInt len;
p += count;
}
total_count += count;
fo->bufWPtr = total_count;
fo->bufRPtr = 0;
return total_count;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment