X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fcli%2Fcli-cmds.c;h=cf88b6dd657e56242e2d175c1063a9c5926ab2f6;hb=614c279dda95dd69c3c14778fc600f4a265847d6;hp=a5b2572d74799619fd80f576514c3c312a787a90;hpb=5fda2332f3403df3e1c37da3e3697d6fb6bc4706;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index a5b2572d74..cf88b6dd65 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -39,6 +39,7 @@ #include "source.h" #include "disasm.h" #include "tracepoint.h" +#include "filestuff.h" #include "ui-out.h" @@ -727,6 +728,8 @@ shell_escape (char *arg, int from_tty) { const char *p, *user_shell; + close_most_fds (); + if ((user_shell = (char *) getenv ("SHELL")) == NULL) user_shell = "/bin/sh";