Commit f06645c5 authored by Matt Connolly's avatar Matt Connolly

Update signaler make_fdpair to set file descriptors to -1 when too many files…

Update signaler make_fdpair to set file descriptors to -1 when too many files are open using socketpair.
parent 8e21bc0b
...@@ -474,7 +474,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) ...@@ -474,7 +474,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv); int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv);
if (rc == -1) { if (rc == -1) {
errno_assert (errno == ENFILE || errno == EMFILE); errno_assert (errno == ENFILE || errno == EMFILE);
sv [0] = sv [1] = -1; *w_ = *r_ = -1;
return -1; return -1;
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment