Module Name: src Committed By: kre Date: Sat Feb 9 09:33:21 UTC 2019
Modified Files: src/bin/sh: main.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/bin/sh/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/sh/main.c diff -u src/bin/sh/main.c:1.81 src/bin/sh/main.c:1.82 --- src/bin/sh/main.c:1.81 Mon Feb 4 11:16:41 2019 +++ src/bin/sh/main.c Sat Feb 9 09:33:20 2019 @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19 #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 @@ main(int argc, char **argv) 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);