From 75c4e0e62be6bd34fb934b9f13de68ffd655c500 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 21 Jul 2011 23:35:26 +0200 Subject: mailbox::recv correctly passes EINTR to the caller This bug caused signal during blocking call to assert. Signed-off-by: Martin Sustrik --- src/mailbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mailbox.cpp') 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. -- cgit v1.2.3