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
51f85719
Commit
51f85719
authored
Nov 07, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified fdpair reset after fork
parent
2be70dca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
+4
-18
signaler.cpp
src/signaler.cpp
+4
-18
No files found.
src/signaler.cpp
View file @
51f85719
...
...
@@ -181,8 +181,7 @@ int zmq::signaler_t::wait (int timeout_)
return
-
1
;
}
#ifdef HAVE_FORK
if
(
unlikely
(
pid
!=
getpid
()))
{
if
(
unlikely
(
pid
!=
getpid
()))
{
// we have forked and the file descriptor is closed. Emulate an interupt
// response.
//printf("Child process %d signaler_t::wait returning simulating interrupt #2\n", getpid());
...
...
@@ -263,23 +262,10 @@ void zmq::signaler_t::recv ()
#ifdef HAVE_FORK
void
zmq
::
signaler_t
::
forked
()
{
int
oldr
=
r
;
#if !defined ZMQ_HAVE_EVENTFD
int
oldw
=
w
;
#endif
// replace the file descriptors created in the parent with new
// ones, and close the inherited ones
// Close file descriptors created in the parent and create new pair
close
(
r
);
close
(
w
);
make_fdpair
(
&
r
,
&
w
);
#if defined ZMQ_HAVE_EVENTFD
int
rc
=
close
(
oldr
);
errno_assert
(
rc
==
0
);
#else
int
rc
=
close
(
oldw
);
errno_assert
(
rc
==
0
);
rc
=
close
(
oldr
);
errno_assert
(
rc
==
0
);
#endif
}
#endif
...
...
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