don't die on eof in sendfd

This commit is contained in:
rsc 2006-07-23 02:57:11 +00:00
parent 6215fd56f1
commit c8a93fb753

View file

@ -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;