aboutsummaryrefslogtreecommitdiff
path: root/gdb/fork-child.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/fork-child.c')
-rw-r--r--gdb/fork-child.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 69a59cc..6820872 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -32,6 +32,7 @@
#include "command.h" /* for dont_repeat () */
#include "gdbcmd.h"
#include "solib.h"
+#include "filestuff.h"
#include <signal.h>
@@ -313,6 +314,8 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
if (pid == 0)
{
+ close_most_fds ();
+
if (debug_fork)
sleep (debug_fork);