EINTR returned from the blocking functions

This commit is contained in:
Martin Sustrik
2010-09-08 08:39:27 +02:00
parent f374431ebe
commit 91ea204644
13 changed files with 93 additions and 84 deletions

View File

@@ -71,8 +71,12 @@ void zmq::io_thread_t::in_event ()
// Get the next command. If there is none, exit.
command_t cmd;
if (!signaler.recv (&cmd, false))
break;
int rc = signaler.recv (&cmd, false);
if (rc != 0 && errno == EINTR)
continue;
if (rc != 0 && errno == EAGAIN)
break;
errno_assert (rc == 0);
// Process the command.
cmd.destination->process_command (cmd);