[zeromq-dev] EAGAIN in zmq_bind

Pieter Hintjens ph at imatix.com
Thu Apr 18 13:23:45 CEST 2013


On Thu, Apr 18, 2013 at 12:36 PM, Uli Köhler
<ulikoehler.dev at googlemail.com> wrote:

> I started using 0MQ about a month ago and I encountered an issue I can't
> explain.

It's not an issue; you're using it wrong... :) Your code works fine.

You cannot use errno (nor zmq_errno, which wraps it) to detect
success/failure since it's not reset systematically after each call.
So after a successful system call you can get errors that were left
over from previous system calls (which never caused errors for the
API).

Test the return code and only if that gives an error, use
errno/zmq_errno for more detail.

-Pieter



More information about the zeromq-dev mailing list