diff options
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; |