aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9pserve.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-05 02:25:41 +0000
committerrsc <devnull@localhost>2004-03-05 02:25:41 +0000
commitc91bd3283a44946fd420ce68c43580aa0d327546 (patch)
tree48d0b6048be63be4c45bf93dc067f64139cba319 /src/cmd/9pserve.c
parent02a1a5c18bec9ca13fad2b7b12ae65c580f6fdf4 (diff)
downloadplan9port-c91bd3283a44946fd420ce68c43580aa0d327546.tar.gz
plan9port-c91bd3283a44946fd420ce68c43580aa0d327546.tar.bz2
plan9port-c91bd3283a44946fd420ce68c43580aa0d327546.zip
Pipes cannot use SOCK_DGRAM. Back to SOCK_STREAM.
Add debugging to fdwait. Rewrite getcallerpc on PowerMac to be correct.
Diffstat (limited to 'src/cmd/9pserve.c')
-rw-r--r--src/cmd/9pserve.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cmd/9pserve.c b/src/cmd/9pserve.c
index 44965a13..8acd5524 100644
--- a/src/cmd/9pserve.c
+++ b/src/cmd/9pserve.c
@@ -167,7 +167,7 @@ threadmain(int argc, char **argv)
void
mainproc(void *v)
{
- int n;
+ int n, nn;
Fcall f;
USED(v);
@@ -186,8 +186,10 @@ mainproc(void *v)
f.tag = NOTAG;
n = convS2M(&f, vbuf, sizeof vbuf);
if(verbose > 1) fprint(2, "* <- %F\n", &f);
- write(1, vbuf, n);
- n = read9pmsg(0, vbuf, sizeof vbuf);
+ nn = write(1, vbuf, n);
+ if(n != nn)
+ sysfatal("error writing Tversion: %r\n");
+ n = threadread9pmsg(0, vbuf, sizeof vbuf);
if(convM2S(vbuf, n, &f) != n)
sysfatal("convM2S failure");
if(f.msize < msize)