iostats: dont sysfatal on 9p read error due to program termination
the note mechanism is racy and can lead to the fs terminating iostats because it gets "i/o on hugup channel" (namespace closed).
This commit is contained in:
parent
1b8fb4fec3
commit
3d12f4f408
1 changed files with 1 additions and 3 deletions
|
@ -166,10 +166,8 @@ main(int argc, char **argv)
|
|||
|
||||
while((n = read9pmsg(p[1], r->buf, sizeof(r->buf))) == 0 && !done)
|
||||
;
|
||||
if(done)
|
||||
if(done || n < 0)
|
||||
break;
|
||||
if(n < 0)
|
||||
fatal("read server");
|
||||
|
||||
if(convM2S(r->buf, n, &r->work) == 0)
|
||||
fatal("format error");
|
||||
|
|
Loading…
Reference in a new issue