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
97cfa64d
Commit
97cfa64d
authored
Nov 07, 2013
by
Richard Newton
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/zeromq/libzmq
parents
c4f09953
998c10a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
25 deletions
+4
-25
signaler.cpp
src/signaler.cpp
+4
-25
No files found.
src/signaler.cpp
View file @
97cfa64d
...
@@ -181,8 +181,7 @@ int zmq::signaler_t::wait (int timeout_)
...
@@ -181,8 +181,7 @@ int zmq::signaler_t::wait (int timeout_)
return
-
1
;
return
-
1
;
}
}
#ifdef HAVE_FORK
#ifdef HAVE_FORK
if
(
unlikely
(
pid
!=
getpid
()))
if
(
unlikely
(
pid
!=
getpid
()))
{
{
// we have forked and the file descriptor is closed. Emulate an interupt
// we have forked and the file descriptor is closed. Emulate an interupt
// response.
// response.
//printf("Child process %d signaler_t::wait returning simulating interrupt #2\n", getpid());
//printf("Child process %d signaler_t::wait returning simulating interrupt #2\n", getpid());
...
@@ -263,23 +262,10 @@ void zmq::signaler_t::recv ()
...
@@ -263,23 +262,10 @@ void zmq::signaler_t::recv ()
#ifdef HAVE_FORK
#ifdef HAVE_FORK
void
zmq
::
signaler_t
::
forked
()
void
zmq
::
signaler_t
::
forked
()
{
{
int
oldr
=
r
;
// Close file descriptors created in the parent and create new pair
#if !defined ZMQ_HAVE_EVENTFD
close
(
r
);
int
oldw
=
w
;
close
(
w
);
#endif
// replace the file descriptors created in the parent with new
// ones, and close the inherited ones
make_fdpair
(
&
r
,
&
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
#endif
...
@@ -422,16 +408,9 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
...
@@ -422,16 +408,9 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
// Cleanup writer if connection failed
// Cleanup writer if connection failed
rc
=
closesocket
(
*
w_
);
rc
=
closesocket
(
*
w_
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
*
w_
=
INVALID_SOCKET
;
*
w_
=
INVALID_SOCKET
;
// Set errno from saved value
// Set errno from saved value
errno
=
wsa_error_to_errno
(
conn_errno
);
errno
=
wsa_error_to_errno
(
conn_errno
);
// Ideally, we would return errno to the caller signaler_t()
// Unfortunately, it uses errno_assert() which gives "Unknown error"
// We might as well assert here and print the actual error message
wsa_assert_no
(
conn_errno
);
return
-
1
;
return
-
1
;
}
}
...
...
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