Skip to content

Commit

Permalink
Merge branch '4549_subshell_execl_argv0'
Browse files Browse the repository at this point in the history
* 4549_subshell_execl_argv0:
  Ticket #4549: subshell: call execl with argv[0] being the actual path to Bash.
  • Loading branch information
aborodin committed Jun 20, 2024
2 parents ed2c15c + 61675a9 commit 7e80ab4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subshell/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ init_subshell_child (const char *pty_name)
switch (mc_global.shell->type)
{
case SHELL_BASH:
execl (mc_global.shell->path, "bash", "-rcfile", init_file, (char *) NULL);
execl (mc_global.shell->path, mc_global.shell->path, "-rcfile", init_file, (char *) NULL);
break;

case SHELL_ZSH:
/* Use -g to exclude cmds beginning with space from history
* and -Z to use the line editor on non-interactive term */
execl (mc_global.shell->path, "zsh", "-Z", "-g", (char *) NULL);
execl (mc_global.shell->path, mc_global.shell->path, "-Z", "-g", (char *) NULL);
break;

case SHELL_ASH_BUSYBOX:
Expand Down

0 comments on commit 7e80ab4

Please sign in to comment.