A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use CLOEXEC
[simgrid.git]
/
src
/
mc
/
remote
/
AppSide.cpp
diff --git
a/src/mc/remote/AppSide.cpp
b/src/mc/remote/AppSide.cpp
index
3c5b688
..
9401138
100644
(file)
--- a/
src/mc/remote/AppSide.cpp
+++ b/
src/mc/remote/AppSide.cpp
@@
-162,7
+162,13
@@
void AppSide::handle_fork(const s_mc_message_int_t* msg)
xbt_assert(pid >= 0, "Could not fork application sub-process: %s.", strerror(errno));
if (pid == 0) { // Child
xbt_assert(pid >= 0, "Could not fork application sub-process: %s.", strerror(errno));
if (pid == 0) { // Child
- int sock = socket(AF_LOCAL, SOCK_SEQPACKET | SOCK_CLOEXEC, 0);
+ int sock = socket(AF_LOCAL,
+ SOCK_SEQPACKET
+#ifdef SOCK_CLOEXEC
+ | SOCK_CLOEXEC /* MacOSX does not have it */
+#endif
+ ,
+ 0);
struct sockaddr_un addr = {};
addr.sun_family = AF_LOCAL;
struct sockaddr_un addr = {};
addr.sun_family = AF_LOCAL;