summaryrefslogtreecommitdiff
path: root/src/mailbox.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-21 23:35:26 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-21 23:35:26 +0200
commit75c4e0e62be6bd34fb934b9f13de68ffd655c500 (patch)
treeee997851660ef712183dc4a98df1d2458007cb77 /src/mailbox.cpp
parent4bd335932ce8c6457dddb7aa2a5e631974eb9b61 (diff)
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>
Diffstat (limited to 'src/mailbox.cpp')
-rw-r--r--src/mailbox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mailbox.cpp b/src/mailbox.cpp
index 9ef3e19..9fd3ac4 100644
--- a/src/mailbox.cpp
+++ b/src/mailbox.cpp
@@ -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.