Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c2702235
Commit
c2702235
authored
Jan 20, 2017
by
Andreas Smas
Committed by
Patrick Steinhardt
Mar 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SOCK_CLOEXEC when creating sockets
parent
93ecb61a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
src/posix.h
+3
-0
src/socket_stream.c
+1
-1
No files found.
src/posix.h
View file @
c2702235
...
...
@@ -59,6 +59,9 @@
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
/* access() mode parameter #defines */
#ifndef F_OK
...
...
src/socket_stream.c
View file @
c2702235
...
...
@@ -104,7 +104,7 @@ int socket_connect(git_stream *stream)
}
for
(
p
=
info
;
p
!=
NULL
;
p
=
p
->
ai_next
)
{
s
=
socket
(
p
->
ai_family
,
p
->
ai_socktype
,
p
->
ai_protocol
);
s
=
socket
(
p
->
ai_family
,
p
->
ai_socktype
|
SOCK_CLOEXEC
,
p
->
ai_protocol
);
if
(
s
==
INVALID_SOCKET
)
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment