summaryrefslogtreecommitdiff
path: root/libbio/bwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbio/bwrite.c')
-rw-r--r--libbio/bwrite.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbio/bwrite.c b/libbio/bwrite.c
index 87256fd0..7661b745 100644
--- a/libbio/bwrite.c
+++ b/libbio/bwrite.c
@@ -7,6 +7,7 @@ Bwrite(Biobuf *bp, void *ap, long count)
long c;
uchar *p;
int i, n, oc;
+ char errbuf[ERRMAX];
p = ap;
c = count;
@@ -21,7 +22,10 @@ Bwrite(Biobuf *bp, void *ap, long count)
return Beof;
i = write(bp->fid, bp->bbuf, bp->bsize);
if(i != bp->bsize) {
- bp->state = Binactive;
+ errstr(errbuf, sizeof errbuf);
+ if(strstr(errbuf, "interrupt") == nil)
+ bp->state = Binactive;
+ errstr(errbuf, sizeof errbuf);
return Beof;
}
bp->offset += i;