diff options
author | Denys Vlasenko | 2011-10-23 18:05:58 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-10-23 18:05:58 +0200 |
commit | ee320c6d9cd0781233ed599d743b4da94b4424a7 (patch) | |
tree | a7099036b3b64449d1bd153f79d776d0aefe6e12 | |
parent | e206a4de4c700230f3dc9fdaa101c6f4432e1c27 (diff) | |
download | busybox-ee320c6d9cd0781233ed599d743b4da94b4424a7.zip busybox-ee320c6d9cd0781233ed599d743b4da94b4424a7.tar.gz |
getty: reset tty attrs on Ctrl-C and Ctrl-D too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | loginutils/getty.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index 3496f02..3273564 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -465,6 +465,7 @@ static char *get_logname(void) /* Do not report trivial EINTR/EIO errors */ errno = EINTR; /* make read of 0 bytes be silent too */ if (read(STDIN_FILENO, &c, 1) < 1) { + finalize_tty_attrs(); if (errno == EINTR || errno == EIO) exit(EXIT_SUCCESS); bb_perror_msg_and_die(bb_msg_read_error); @@ -497,6 +498,7 @@ static char *get_logname(void) } break; case CTL('D'): + finalize_tty_attrs(); exit(EXIT_SUCCESS); default: if ((unsigned char)c < ' ') { diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 7cd0b7b..3d4c397 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -1548,7 +1548,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) * * We think that real server IP (one to use in renew/release) * is one in Server-ID option. But I am not 100% sure. - * IP header's src and Gateway-IP (same in this exaqmple) + * IP header's src and Gateway-IP (same in this example) * might work too. * "Next server" and router are definitely wrong ones to use, though... */ |