projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' into processes
[collectd.git]
/
src
/
common.c
diff --git
a/src/common.c
b/src/common.c
index
98e6704
..
5487b32
100644
(file)
--- a/
src/common.c
+++ b/
src/common.c
@@
-144,6
+144,15
@@
ssize_t sread (int fd, void *buf, size_t count)
if (status < 0)
return (status);
+ if (status == 0)
+ {
+ DBG ("Received EOF from fd %i. "
+ "Closing fd and returning error.",
+ fd);
+ close (fd);
+ return (-1);
+ }
+
assert (nleft >= status);
nleft = nleft - status;