PR gdb/7912:
[deliverable/binutils-gdb.git] / gdb / common / agent.c
index f7bedc2c874a9a93a5f5765857e3d618d3708e35..99cef4fcab354d67f18554ace50d709472881904 100644 (file)
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <unistd.h>
 #include "agent.h"
+#include "filestuff.h"
 
 int debug_agent = 0;
 
@@ -168,7 +169,7 @@ gdb_connect_sync_socket (int pid)
   if (res >= UNIX_PATH_MAX)
     return -1;
 
-  res = fd = socket (PF_UNIX, SOCK_STREAM, 0);
+  res = fd = gdb_socket_cloexec (PF_UNIX, SOCK_STREAM, 0);
   if (res == -1)
     {
       warning (_("error opening sync socket: %s"), strerror (errno));
This page took 0.053164 seconds and 4 git commands to generate.