diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-06 20:59:23 +0000 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-06 20:59:23 +0000 |
| commit | 72335078034e3cd7edcb1739556b405a3e1e9bf8 (patch) | |
| tree | 9e1baa8ea80bfab1885cfcf224a62040a417fa74 /libbio/bwrite.c | |
| parent | 3a0400887de9df81e4d4fb3bc3dec52af2d49f80 (diff) | |
sync with plan 9
Diffstat (limited to 'libbio/bwrite.c')
| -rw-r--r-- | libbio/bwrite.c | 6 |
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; |
