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
ec76cc48
Commit
ec76cc48
authored
Oct 06, 2017
by
Patrick Steinhardt
Committed by
GitHub
Oct 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4364 from andoma/master
Use SOCK_CLOEXEC when creating sockets
parents
c7c5f2c4
9fe70c9e
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 @
ec76cc48
...
@@ -60,6 +60,9 @@
...
@@ -60,6 +60,9 @@
#ifndef O_CLOEXEC
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#define O_CLOEXEC 0
#endif
#endif
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
/* access() mode parameter #defines */
/* access() mode parameter #defines */
#ifndef F_OK
#ifndef F_OK
...
...
src/socket_stream.c
View file @
ec76cc48
...
@@ -104,7 +104,7 @@ int socket_connect(git_stream *stream)
...
@@ -104,7 +104,7 @@ int socket_connect(git_stream *stream)
}
}
for
(
p
=
info
;
p
!=
NULL
;
p
=
p
->
ai_next
)
{
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
)
if
(
s
==
INVALID_SOCKET
)
continue
;
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