#include "gdbcmd.h"
#include "cli/cli-decode.h"
#include "cli/cli-setshow.h"
+#include "filestuff.h"
#include <sys/types.h>
retry:
if (use_udp)
- scb->fd = socket (PF_INET, SOCK_DGRAM, 0);
+ scb->fd = gdb_socket_cloexec (PF_INET, SOCK_DGRAM, 0);
else
- scb->fd = socket (PF_INET, SOCK_STREAM, 0);
+ scb->fd = gdb_socket_cloexec (PF_INET, SOCK_STREAM, 0);
if (scb->fd == -1)
return -1;