mailbox::recv correctly passes EINTR to the caller

This bug caused signal during blocking call to assert.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Martin Sustrik 2011-07-21 23:35:26 +02:00
parent 4bd335932c
commit 75c4e0e62b

View File

@ -66,7 +66,7 @@ int zmq::mailbox_t::recv (command_t *cmd_, int timeout_)
// Wait for signal from the command sender.
int rc = signaler.wait (timeout_);
if (rc != 0 && errno == EAGAIN)
if (rc != 0 && (errno == EAGAIN || errno == EINTR))
return -1;
// We've got the signal. Now we can switch into active state.