aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-fileio.c')
-rw-r--r--gdb/remote-fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 2f9d644..cc39bdf 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -31,6 +31,7 @@
#include "event-loop.h"
#include "target.h"
#include "filenames.h"
+#include "filestuff.h"
#include <fcntl.h>
#include <sys/time.h>
@@ -639,7 +640,7 @@ remote_fileio_func_open (char *buf)
}
remote_fio_no_longjmp = 1;
- fd = open (pathname, flags, mode);
+ fd = gdb_open_cloexec (pathname, flags, mode);
if (fd < 0)
{
remote_fileio_return_errno (-1);