aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-22 21:17:46 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-22 21:17:46 +0200
commit765b0eed3ef29a80115708c3249d3a541509cd24 (patch)
tree5ce30caa7a8195ed5e913208b5c9db74454c1be2
parentfef9ee70727452954d2c5d28cc65e8b0fffcd6f1 (diff)
downloadbusybox-w32-765b0eed3ef29a80115708c3249d3a541509cd24.tar.gz
busybox-w32-765b0eed3ef29a80115708c3249d3a541509cd24.tar.bz2
busybox-w32-765b0eed3ef29a80115708c3249d3a541509cd24.zip
getty: do not emit bogus error message on EOF
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--loginutils/getty.c1
1 files changed, 1 insertions, 0 deletions
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,
431 while (cp->eol == '\0') { 431 while (cp->eol == '\0') {
432 432
433 /* Do not report trivial EINTR/EIO errors. */ 433 /* Do not report trivial EINTR/EIO errors. */
434 errno = EINTR; /* make read of 0 bytes be silent too */
434 if (read(STDIN_FILENO, &c, 1) < 1) { 435 if (read(STDIN_FILENO, &c, 1) < 1) {
435 if (errno == EINTR || errno == EIO) 436 if (errno == EINTR || errno == EIO)
436 exit(EXIT_SUCCESS); 437 exit(EXIT_SUCCESS);