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:
cinap_lenrek 2014-06-08 18:27:39 +02:00
parent 1b8fb4fec3
commit 3d12f4f408

View file

@ -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");