aboutsummaryrefslogtreecommitdiff
path: root/gdb/corelow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index fa48941..46da881 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -47,6 +47,7 @@
#include "objfiles.h"
#include "gdb_bfd.h"
#include "completer.h"
+#include "filestuff.h"
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
@@ -312,7 +313,7 @@ core_open (char *filename, int from_tty)
flags |= O_RDWR;
else
flags |= O_RDONLY;
- scratch_chan = open (filename, flags, 0);
+ scratch_chan = gdb_open_cloexec (filename, flags, 0);
if (scratch_chan < 0)
perror_with_name (filename);