From: Denys Vlasenko Date: Sat, 22 May 2010 19:17:46 +0000 (+0200) Subject: getty: do not emit bogus error message on EOF X-Git-Tag: 1_17_0~168 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=765b0eed3ef29a80115708c3249d3a541509cd24;p=oweals%2Fbusybox.git getty: do not emit bogus error message on EOF Signed-off-by: Denys Vlasenko --- diff --git a/loginutils/getty.c b/loginutils/getty.c index d032357e2..7fb861f9d 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);