Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh When an interactive shell exits due to an EOF on stdi...
details: https://anonhg.NetBSD.org/src/rev/858d933ec448
branches: trunk
changeset: 996829:858d933ec448
user: kre <kre%NetBSD.org@localhost>
date: Sat Feb 09 09:33:20 2019 +0000
description:
When an interactive shell exits due to an EOF on stdin, send a newline
to stderr (to follow the previous prompt) and cleanup more nicely.
diffstat:
bin/sh/main.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 420d0a9a6c43 -r 858d933ec448 bin/sh/main.c
--- a/bin/sh/main.c Sat Feb 09 09:31:33 2019 +0000
+++ b/bin/sh/main.c Sat Feb 09 09:33:20 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.81 2019/02/04 11:16:41 kre Exp $ */
+/* $NetBSD: main.c,v 1.82 2019/02/09 09:33:20 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.7 (Berkeley) 7/19/95";
#else
-__RCSID("$NetBSD: main.c,v 1.81 2019/02/04 11:16:41 kre Exp $");
+__RCSID("$NetBSD: main.c,v 1.82 2019/02/09 09:33:20 kre Exp $");
#endif
#endif /* not lint */
@@ -244,6 +244,10 @@
if (sflag || minusc == NULL) {
state4: /* XXX ??? - why isn't this before the "if" statement */
cmdloop(1);
+ if (iflag) {
+ out2str("\n");
+ flushout(&errout);
+ }
}
#if PROFILE
monitor(0);
Home |
Main Index |
Thread Index |
Old Index