Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Set (accidentally removed) SOCK_CLOEXEC again.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 22 Sep 2017 16:37:07 +0000 (18:37 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 22 Sep 2017 16:37:07 +0000 (18:37 +0200)
src/mc/Session.cpp

index 92b8d63..ce79e7c 100644 (file)
@@ -140,7 +140,7 @@ Session* Session::fork(std::function<void()> code)
   // process:
   int res;
   int sockets[2];
   // process:
   int res;
   int sockets[2];
-  res = socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, sockets);
+  res = socketpair(AF_LOCAL, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, sockets);
   if (res == -1)
     throw simgrid::xbt::errno_error("Could not create socketpair");
 
   if (res == -1)
     throw simgrid::xbt::errno_error("Could not create socketpair");