[PATCH] [SHELL] print \n upon EOF (CTRL-D) when run interactively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suggested by jidanni through
 http://bugs.debian.org/476422

Signed-off-by: Gerrit Pape <pape@xxxxxxxxxxx>
---
 src/main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main.c b/src/main.c
index 7d07e2d..5f1ff0e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -228,8 +228,15 @@ cmdloop(int top)
 			if (!top || numeof >= 50)
 				break;
 			if (!stoppedjobs()) {
-				if (!Iflag)
+				if (!Iflag) {
+					if (iflag) {
+						out2c('\n');
+#ifdef FLUSHERR
+						flushout(out2);
+#endif
+					}
 					break;
+				}
 				out2str("\nUse \"exit\" to leave shell.\n");
 			}
 			numeof++;
-- 
1.6.1.2.346.g8600b3.dirty

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux