diff options
author | rsc <devnull@localhost> | 2006-07-23 02:57:11 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-07-23 02:57:11 +0000 |
commit | c8a93fb753d4cd3c6adc4fa939905e181151a513 (patch) | |
tree | fd452212384988af8777bb597799cc10823af0fe /src/lib9 | |
parent | 6215fd56f1c9d9392806efd1ac499f91c8ae83fb (diff) | |
download | plan9port-c8a93fb753d4cd3c6adc4fa939905e181151a513.tar.gz plan9port-c8a93fb753d4cd3c6adc4fa939905e181151a513.tar.bz2 plan9port-c8a93fb753d4cd3c6adc4fa939905e181151a513.zip |
don't die on eof in sendfd
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/sendfd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib9/sendfd.c b/src/lib9/sendfd.c index 23741e78..10966828 100644 --- a/src/lib9/sendfd.c +++ b/src/lib9/sendfd.c @@ -78,7 +78,10 @@ recvfd(int s) if((n=recvmsg(s, &msg, 0)) < 0) return -1; - + if(n == 0){ + werrstr("unexpected EOF"); + return -1; + } cmsg = CMSG_FIRSTHDR(&msg); fd = *(int*)CMSG_DATA(cmsg); return fd; |