From 72335078034e3cd7edcb1739556b405a3e1e9bf8 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Thu, 6 Jun 2013 20:59:23 +0000 Subject: sync with plan 9 --- libbio/bwrite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libbio/bwrite.c') 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; -- cgit v1.2.3