aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/getty.c')
-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,
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);