Ticket #373 (closed enhancement: duplicate)
git master: support for SHELL=/bin/sh in subshell
Reported by: | slyfox | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mc-core | Version: | 4.6.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Many environments provide POSIX compliant /bin/sh shell symlinking to:
busybox: ash, hush
debian: dash
(passwd entry usually contains /bin/sh for them)
There is no excuse to not support common shells.
It at the very least confuses newbie users.
Attachments
Change History
comment:1 Changed 13 years ago by andrew_b
- Branch state set to no branch
- Milestone changed from 4.7 to Future Releases
comment:2 Changed 7 years ago by andrew_b
Ticket #3658 has been marked as a duplicate of this ticket.
comment:4 Changed 7 years ago by sorin
This bug is still valid and prevents use of mc on lost of system. Another entire set is FreeBSD and pfSense where starting mc works only with "mc -u" which is real PITA.
At least this fatal error should be converted into a warning that does not prevent the app from starting.
comment:5 Changed 4 years ago by enerccio
again 11 years and no fix :x still present on many embedded devices that use busybox shell
comment:6 Changed 19 months ago by Snelius
I've added the patch to fix this misbehaviour. It disables a subshell to allow mc start.
This patch against master branch.
GH PR: https://github.com/MidnightCommander/mc/pull/183
comment:7 Changed 18 months ago by zaytsev
From e2d7ee06bc32c40f119372d15df362913efbcbfd Mon Sep 17 00:00:00 2001 From: Anatoly Y <anatoly@box64.top> Date: Thu, 13 Apr 2023 22:24:16 +0700 Subject: [PATCH] Workaround. Fix. #373 --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index c18e069c68..3564876d07 100644 --- a/src/main.c +++ b/src/main.c @@ -362,7 +362,7 @@ main (int argc, char *argv[]) #ifdef ENABLE_SUBSHELL /* Disallow subshell when invoked as standalone viewer or editor from running mc */ - if (mc_global.mc_run_mode != MC_RUN_FULL && mc_global.run_from_parent_mc) + if (mc_global.shell->type == SHELL_SH || (mc_global.mc_run_mode != MC_RUN_FULL && mc_global.run_from_parent_mc)) mc_global.tty.use_subshell = FALSE; if (mc_global.tty.use_subshell)