We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7c5f2c commit 9fe70c9Copy full SHA for 9fe70c9
src/posix.h
@@ -60,6 +60,9 @@
60
#ifndef O_CLOEXEC
61
#define O_CLOEXEC 0
62
#endif
63
+#ifndef SOCK_CLOEXEC
64
+#define SOCK_CLOEXEC 0
65
+#endif
66
67
/* access() mode parameter #defines */
68
#ifndef F_OK
src/socket_stream.c
@@ -104,7 +104,7 @@ int socket_connect(git_stream *stream)
104
}
105
106
for (p = info; p != NULL; p = p->ai_next) {
107
- s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
+ s = socket(p->ai_family, p->ai_socktype | SOCK_CLOEXEC, p->ai_protocol);
108
109
if (s == INVALID_SOCKET)
110
continue;
0 commit comments