>From 75c4e0e62be6bd34fb934b9f13de68ffd655c500 Mon Sep 17 00:00:00 2001
From: Martin Sustrik <[email protected]>
Date: Thu, 21 Jul 2011 23:35:26 +0200
Subject: [PATCH] mailbox::recv correctly passes EINTR to the caller

This bug caused signal during blocking call to assert.

Signed-off-by: Martin Sustrik <[email protected]>
---
 src/mailbox.cpp |    2 +-
 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.
-- 
1.7.0.4

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to