Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
cbbfa147
Commit
cbbfa147
authored
Apr 04, 2014
by
evoskuil
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zeromq/master'
parents
5d0701d7
c1f7e1f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
ipc_listener.cpp
src/ipc_listener.cpp
+7
-0
session_base.cpp
src/session_base.cpp
+0
-1
tcp_listener.cpp
src/tcp_listener.cpp
+7
-0
No files found.
src/ipc_listener.cpp
View file @
cbbfa147
...
...
@@ -280,6 +280,13 @@ zmq::fd_t zmq::ipc_listener_t::accept ()
return
retired_fd
;
}
// Race condition can cause socket not to be closed (if fork happens
// between accept and this point).
#ifdef FD_CLOEXEC
int
rc
=
fcntl
(
sock
,
F_SETFD
,
FD_CLOEXEC
);
errno_assert
(
rc
!=
-
1
);
#endif
// IPC accept() filters
#if defined ZMQ_HAVE_SO_PEERCRED || defined ZMQ_HAVE_LOCAL_PEERCRED
if
(
!
filter
(
sock
))
{
...
...
src/session_base.cpp
View file @
cbbfa147
...
...
@@ -309,7 +309,6 @@ int zmq::session_base_t::zap_connect ()
zap_pipe
->
set_nodelay
();
zap_pipe
->
set_event_sink
(
this
);
new_pipes
[
1
]
->
set_nodelay
();
send_bind
(
peer
.
socket
,
new_pipes
[
1
],
false
);
// Send empty identity if required by the peer.
...
...
src/tcp_listener.cpp
View file @
cbbfa147
...
...
@@ -288,6 +288,13 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
}
#endif
// Race condition can cause socket not to be closed (if fork happens
// between accept and this point).
#ifdef FD_CLOEXEC
int
rc
=
fcntl
(
sock
,
F_SETFD
,
FD_CLOEXEC
);
errno_assert
(
rc
!=
-
1
);
#endif
if
(
!
options
.
tcp_accept_filters
.
empty
())
{
bool
matched
=
false
;
for
(
options_t
::
tcp_accept_filters_t
::
size_type
i
=
0
;
i
!=
options
.
tcp_accept_filters
.
size
();
++
i
)
{
...
...
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