only try to receive one byte to avoid discarding data

This commit is contained in:
leitner 2010-10-06 17:33:25 +00:00
parent 928bfe5c09
commit d2aae4864c

View File

@ -41,10 +41,10 @@ int64 io_receivefd(int64 sock) {
#else #else
int fd; int fd;
#endif #endif
char x[100]; char x;
char name[100]; char name[100];
iov.iov_base=x; iov.iov_base=&x;
iov.iov_len=100; iov.iov_len=1;
msg.msg_name=name; msg.msg_name=name;
msg.msg_namelen=100; msg.msg_namelen=100;
#ifdef CMSG_FIRSTHDR #ifdef CMSG_FIRSTHDR