mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-09 23:57:50 +01:00
Problem: in case of exhausted resources on creation of a context, assertions are triggered
Solution: signal error to caller, and apply appropriate cleanup
This commit is contained in:
@@ -372,6 +372,11 @@ int zmq::signaler_t::recv_failable ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool zmq::signaler_t::valid () const
|
||||
{
|
||||
return w != retired_fd;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FORK
|
||||
void zmq::signaler_t::forked ()
|
||||
{
|
||||
@@ -398,7 +403,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
|
||||
errno_assert (errno == ENFILE || errno == EMFILE);
|
||||
*w_ = *r_ = -1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
*w_ = *r_ = fd;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user