Ticket #4549: subshell: call execl with argv[0] being the actual path to Bash.
commit61675a90a890330658fbf674927456c53b4fb698
authorKoichi Murase <myoga.murase@gmail.com>
Wed, 19 Jun 2024 05:00:16 +0000 (19 14:00 +0900)
committerAndrew Borodin <aborodin@vmail.ru>
Thu, 20 Jun 2024 18:02:55 +0000 (20 21:02 +0300)
tree768dfafed5a50b947f870ac1fc9067e9707f0956
parented2c15cc683afbd117c8693155dd81e32a773960
Ticket #4549: subshell: call execl with argv[0] being the actual path to Bash.

We currently call Bash with argv[0] being just the fixed string
"bash", but this confuses Bash when it initializes the shell variable
BASH, which are expected to be the absolute file path to the current
Bash image.  This patch fixes argv[0] to be the actual path that mc
uses to start Bash.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
src/subshell/common.c