From c3563c46ed40c3021b61f5ed228c9eca2d64e1f3 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Wed, 15 Nov 2000 03:16:06 +0000 Subject: [PATCH] Doc. --- io.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/io.c b/io.c index 253344b0..39996885 100644 --- a/io.c +++ b/io.c @@ -104,9 +104,15 @@ static void read_error_fd(void) static int no_flush; -/* read from a socket with IO timeout. return the number of - bytes read. If no bytes can be read then exit, never return - a number <= 0 */ +/* + * Read from a socket with IO timeout. return the number of bytes + * read. If no bytes can be read then exit, never return a number <= 0. + * + * TODO: If the remote shell connection fails, then current versions actually + * report an "unexpected EOF" error here. Since it's a fairly common mistake + * to try to use rsh when ssh is required, we should trap that: if we fail + * to read any data at all, we should give a better explanation. + */ static int read_timeout(int fd, char *buf, int len) { int n, ret=0; -- 2.34.1