diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-cmds.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index b871e47..135f550 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -50,6 +50,7 @@ #include "cli/cli-utils.h" #include "extension.h" +#include "common/pathstuff.h" #ifdef TUI #include "tui/tui.h" /* For tui_active et.al. */ @@ -726,13 +727,10 @@ shell_escape (const char *arg, int from_tty) if ((pid = vfork ()) == 0) { - const char *p, *user_shell; + const char *p, *user_shell = get_shell (); close_most_fds (); - if ((user_shell = getenv ("SHELL")) == NULL) - user_shell = "/bin/sh"; - /* Get the name of the shell for arg0. */ p = lbasename (user_shell); |