aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 690485a83..407a0304c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -426,7 +426,11 @@ static const char *const optletters_optnames[] = {
426 "m" "monitor", 426 "m" "monitor",
427 "n" "noexec", 427 "n" "noexec",
428/* Ditto: bash has no "set -s" */ 428/* Ditto: bash has no "set -s" */
429#if !ENABLE_PLATFORM_MINGW32
429 "s" "", 430 "s" "",
431#else
432 "s" "stdin",
433#endif
430 "c" "", 434 "c" "",
431 "x" "xtrace", 435 "x" "xtrace",
432 "v" "verbose", 436 "v" "verbose",
@@ -14990,7 +14994,9 @@ procargs(char **argv)
14990 } 14994 }
14991 if (iflag == 2 /* no explicit -i given */ 14995 if (iflag == 2 /* no explicit -i given */
14992 && sflag == 1 /* -s given (or implied) */ 14996 && sflag == 1 /* -s given (or implied) */
14997#if !ENABLE_PLATFORM_MINGW32
14993 && !minusc /* bash compat: ash -sc 'echo $-' is not interactive (dash is) */ 14998 && !minusc /* bash compat: ash -sc 'echo $-' is not interactive (dash is) */
14999#endif
14994 && isatty(0) && isatty(1) /* we are on tty */ 15000 && isatty(0) && isatty(1) /* we are on tty */
14995 ) { 15001 ) {
14996 iflag = 1; 15002 iflag = 1;
@@ -15254,7 +15260,11 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
15254 // ash -sc 'echo $-' 15260 // ash -sc 'echo $-'
15255 // continue reading input from stdin after running 'echo'. 15261 // continue reading input from stdin after running 'echo'.
15256 // bash does not do this: it prints "hBcs" and exits. 15262 // bash does not do this: it prints "hBcs" and exits.
15263#if !ENABLE_PLATFORM_MINGW32
15257 evalstring(minusc, EV_EXIT); 15264 evalstring(minusc, EV_EXIT);
15265#else
15266 evalstring(minusc, sflag ? 0 : EV_EXIT);
15267#endif
15258 } 15268 }
15259 15269
15260 if (sflag || minusc == NULL) { 15270 if (sflag || minusc == NULL) {