[git commit master] getty: do not emit bogus error message on EOF

Denys Vlasenko vda.linux at googlemail.com
Sat May 22 19:17:46 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=765b0eed3ef29a80115708c3249d3a541509cd24
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 loginutils/getty.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/loginutils/getty.c b/loginutils/getty.c
index d032357..7fb861f 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -431,6 +431,7 @@ static char *get_logname(char *logname, unsigned size_logname,
 		while (cp->eol == '\0') {
 
 			/* Do not report trivial EINTR/EIO errors. */
+			errno = EINTR; /* make read of 0 bytes be silent too */
 			if (read(STDIN_FILENO, &c, 1) < 1) {
 				if (errno == EINTR || errno == EIO)
 					exit(EXIT_SUCCESS);
-- 
1.6.3.3



More information about the busybox-cvs mailing list