PR gdb/7912:
[deliverable/binutils-gdb.git] / gdb / auxv.c
index 3a63a65d6c78e0a6c6bdd6a015fb68535dc152bf..879d7e1fc545aa3945a84a9c5a716b00740765fe 100644 (file)
@@ -26,6 +26,7 @@
 #include "gdb_assert.h"
 #include "gdbcore.h"
 #include "observer.h"
+#include "filestuff.h"
 
 #include "auxv.h"
 #include "elf/common.h"
@@ -48,7 +49,7 @@ procfs_xfer_auxv (gdb_byte *readbuf,
   LONGEST n;
 
   pathname = xstrprintf ("/proc/%d/auxv", PIDGET (inferior_ptid));
-  fd = open (pathname, writebuf != NULL ? O_WRONLY : O_RDONLY);
+  fd = gdb_open_cloexec (pathname, writebuf != NULL ? O_WRONLY : O_RDONLY, 0);
   xfree (pathname);
   if (fd < 0)
     return -1;
This page took 0.024611 seconds and 4 git commands to generate.