PR gdb/7912:
[deliverable/binutils-gdb.git] / gdb / fork-child.c
index 69a59cc739427673d5143cc1d88b62a0965d56ca..6820872a04252e122aee962751c5ee18760bb793 100644 (file)
@@ -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);
 
This page took 0.027493 seconds and 4 git commands to generate.