This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 2018-09-26 07:11, Tom Tromey wrote:
diff --git a/gdb/procfs.c b/gdb/procfs.c index 6ffe569e69..ca381a71ae 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c@@ -3035,11 +3035,11 @@ procfs_target::create_inferior (const char *exec_file,const std::string &allargs, char **env, int from_tty) { - char *shell_file = getenv ("SHELL"); + const char *shell_file = get_shell (); char *tryname; int pid; - if (shell_file != NULL && strchr (shell_file, '/') == NULL) + if (strchr (shell_file, '/') == NULL)
At first I thought this would change the behavior here, but I think it's fine. If SHELL is not defined, we used to pass NULL to fork_inferior, and it would fall back to /bin/sh. Now, the fallback just happens sooner. So this looks good, I think this patch can go in by itself.
Thanks, Simon
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |