From d2aae4864c876ce793ced81f58d12058ba7c35d2 Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 6 Oct 2010 17:33:25 +0000 Subject: [PATCH] only try to receive one byte to avoid discarding data --- io/io_receivefd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io/io_receivefd.c b/io/io_receivefd.c index 502bf7a..73cdcf7 100644 --- a/io/io_receivefd.c +++ b/io/io_receivefd.c @@ -41,10 +41,10 @@ int64 io_receivefd(int64 sock) { #else int fd; #endif - char x[100]; + char x; char name[100]; - iov.iov_base=x; - iov.iov_len=100; + iov.iov_base=&x; + iov.iov_len=1; msg.msg_name=name; msg.msg_namelen=100; #ifdef CMSG_FIRSTHDR