aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ser-unix.c')
-rw-r--r--gdb/ser-unix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 9ec8bb1..cd1d9a9 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -31,6 +31,7 @@
#include "gdb_select.h"
#include "gdb_string.h"
#include "gdbcmd.h"
+#include "filestuff.h"
#ifdef HAVE_TERMIOS
@@ -107,7 +108,7 @@ void _initialize_ser_hardwire (void);
static int
hardwire_open (struct serial *scb, const char *name)
{
- scb->fd = open (name, O_RDWR);
+ scb->fd = gdb_open_cloexec (name, O_RDWR, 0);
if (scb->fd < 0)
return -1;