Problem: On OSX usleep() changes the errno value

Solution: Update errno value after calling usleep()
This commit is contained in:
Anton Bärwald 2017-11-02 09:59:47 +01:00
parent 812e756264
commit 630f6d6ae7

View File

@ -553,6 +553,10 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
#elif defined ZMQ_HAVE_ANDROID
usleep (timeout_ * 1000);
return -1;
#elif defined ZMQ_HAVE_OSX
usleep (timeout_ * 1000);
errno = EAGAIN;
return -1;
#else
usleep (timeout_ * 1000);
return -1;