* Niki W. Waibel <niki.waibel@gmx.net>
**/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "common.h"
#include "utils_debug.h"
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;