[zeromq-dev] Checking for errors on zmq_poll: is it correct?

Claudio Carbone erupter at libero.it
Thu Aug 16 22:51:02 CEST 2012

Well I used to do this and it was never 0.
My code was
Zerrno = zmq_poll(...);
If(zerrno != 0)

I was always getting some error, so I tried using zmq_errno() and the result
is the same.


-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org
[mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Chernyshev
Sent: giovedì 16 agosto 2012 22:48
To: ZeroMQ development list
Subject: Re: [zeromq-dev] Checking for errors on zmq_poll: is it correct?

17.08.12, 0:37, Claudio Carbone wrote:
> So how exactly should I check for errors with polling?
You should check return value of zmq_poll, not errno. zmq_poll will return
-1 if any error has happened. It is valid to check errno only when -1 was
returned from zmq_poll.
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org

More information about the zeromq-dev mailing list