Re: [Midnight Commander] #373: git master: support for SHELL=/bin/sh in subshell

0 views
Skip to first unread message

Ticket System

unread,
Apr 13, 2023, 11:55:07 AM4/13/23
to sly...@gmail.com, mc-...@googlegroups.com
#373: git master: support for SHELL=/bin/sh in subshell
----------------------------+---------------------------------------
Reporter: slyfox | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.6.2
Resolution: | Keywords:
Blocked By: 3692 | Blocking:
Branch state: no branch | Votes for changeset:
----------------------------+---------------------------------------

Comment (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

--
Ticket URL: <http://www.midnight-commander.org/ticket/373#comment:6>
Midnight Commander <https://midnight-commander.org>
Midnight Development Center

Ticket System

unread,
May 23, 2023, 4:13:45 AM5/23/23
to sly...@gmail.com, mc-...@googlegroups.com
#373: git master: support for SHELL=/bin/sh in subshell
----------------------------+---------------------------------------
Reporter: slyfox | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.6.2
Resolution: | Keywords:
Blocked By: 3692 | Blocking:
Branch state: no branch | Votes for changeset:
----------------------------+---------------------------------------

Comment (by zaytsev):

{{{
From e2d7ee06bc32c40f119372d15df362913efbcbfd Mon Sep 17 00:00:00 2001
From: Anatoly Y <ana...@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)
}}}

--
Ticket URL: <http://www.midnight-commander.org/ticket/373#comment:7>

Reply all
Reply to author
Forward
0 new messages