From 61ab977f012a23d364751a2848246a4e400cbea7 Mon Sep 17 00:00:00 2001 From: hsc Date: Tue, 13 Nov 2012 00:17:25 +0000 Subject: [PATCH] bugfix: read(2) returns 0 on EOF git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1925 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- src/core/comm/SocketComm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/comm/SocketComm.cc b/src/core/comm/SocketComm.cc index bef80d23..092748c9 100644 --- a/src/core/comm/SocketComm.cc +++ b/src/core/comm/SocketComm.cc @@ -80,7 +80,7 @@ ssize_t SocketComm::safe_read(int fd, void *buf, size_t count) } count -= ret; cbuf += ret; - } while (count); + } while (ret && count); return cbuf - (const char *) buf; }