PR gdb/7912:
[deliverable/binutils-gdb.git] / gdb / inf-child.c
index 5f3492293487fa2f29f289b2f3d1c258eb11f7ee..15d861302bffc3e779492673a77394b48bca85bf 100644 (file)
@@ -30,6 +30,7 @@
 #include "gdb/fileio.h"
 #include "agent.h"
 #include "gdb_wait.h"
+#include "filestuff.h"
 
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>         /* for MAXPATHLEN */
@@ -245,7 +246,7 @@ inf_child_fileio_open (const char *filename, int flags, int mode,
 
   /* We do not need to convert MODE, since the fileio protocol uses
      the standard values.  */
-  fd = open (filename, nat_flags, mode);
+  fd = gdb_open_cloexec (filename, nat_flags, mode);
   if (fd == -1)
     *target_errno = inf_child_errno_to_fileio_error (errno);
 
This page took 0.0251 seconds and 4 git commands to generate.