summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/hush.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 7cc678f..144ad3e 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2670,6 +2670,8 @@ static int get_user_input(struct in_str *i)
}
if (r < 0) {
/* EOF/error detected */
+ /* ^D on interactive input goes to next line before exiting: */
+ write(STDOUT_FILENO, "\n", 1);
i->p = NULL;
i->peek_buf[0] = r = EOF;
return r;