diff options
-rw-r--r-- | shell/ash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5743b23..b12b859 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -13508,12 +13508,13 @@ cmdloop(int top) if (!top || numeof >= 50) break; if (!stoppedjobs()) { + if (!iflag) + break; if (!Iflag) { - if (iflag) { - newline_and_flush(stderr); - } + newline_and_flush(stderr); break; } + /* "set -o ignoreeof" active, do not exit command loop on ^D */ out2str("\nUse \"exit\" to leave shell.\n"); } numeof++; |