diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-06-08 18:27:39 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-06-08 18:27:39 +0200 |
commit | 3d12f4f408da568dcb9cb0ba802dc9824cbe26fd (patch) | |
tree | f6ef6f32b45e2d7e06a3a2d9dc2c1ae67ecbe494 /sys/src | |
parent | 1b8fb4fec399dd9520db68b0c8e97d21881d639b (diff) |
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).
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/iostats/iostats.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/src/cmd/iostats/iostats.c b/sys/src/cmd/iostats/iostats.c index 61b16ea4b..e65c7c83b 100644 --- a/sys/src/cmd/iostats/iostats.c +++ b/sys/src/cmd/iostats/iostats.c @@ -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"); |