blob: 8797eee462c828dec6043d42e826cf303a2d1dfe [file] [log] [blame]
--- xqf.orig/src/launch.c
+++ xqf/src/launch.c
@@ -168,13 +168,17 @@
res = read (fd, cl->buffer + cl->pos, CLIENT_ERROR_BUFFER - 1 - cl->pos);
- if (res <= 0) { /* read error or EOF */
+ if (res < 0) { /* read error or EOF */
if (errno == EAGAIN || errno == EWOULDBLOCK)
return;
client_detach (cl);
return;
}
+ else if (res == 0) {
+ client_detach (cl);
+ return;
+ }
if (cl->pos + res == CLIENT_ERROR_BUFFER - 1) {
tmp = &cl->buffer[CLIENT_ERROR_BUFFER - 1];