diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-16 06:26:31 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-16 06:26:31 +0200 |
commit | e36d9f5c4e667970a4a7aa15744e304ccc7c58f3 (patch) | |
tree | 353251f1adcf5cd89a1cc901f7aed099011b8a19 /sys/src/cmd/rio/fsys.c | |
parent | d84aeddee7911c9df739bad58c72189ac336f23f (diff) |
make filesystem handling of read9pmsg() consistent
Diffstat (limited to 'sys/src/cmd/rio/fsys.c')
-rw-r--r-- | sys/src/cmd/rio/fsys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/cmd/rio/fsys.c b/sys/src/cmd/rio/fsys.c index 1676ef1f9..fe4d186e4 100644 --- a/sys/src/cmd/rio/fsys.c +++ b/sys/src/cmd/rio/fsys.c @@ -194,8 +194,9 @@ filsysproc(void *arg) x = nil; for(;;){ buf = emalloc(messagesize+UTFmax); /* UTFmax for appending partial rune in xfidwrite */ - n = read9pmsg(fs->sfd, buf, messagesize); - if(n <= 0){ + while((n = read9pmsg(fs->sfd, buf, messagesize)) == 0) + yield(); + if(n < 0){ yield(); /* if threadexitsall'ing, will not return */ fprint(2, "rio: %d: read9pmsg: %d %r\n", getpid(), n); errorshouldabort = 0; |