[zeromq-dev] zmq_poll() error

Matt Connolly matt.connolly at me.com
Tue Jan 7 10:46:52 CET 2014


Surely the signal would affect zmq_poll() the same way it would affect select() on your thread. I don’t know a way to check what signal caused the EINTR; perhaps you need to install signal handlers until you find it.

-Matt

On 7 Jan 2014, at 10:42 am, Lindley French <lindleyf at gmail.com> wrote:

> That would be easier if I weren't using zmqpp around it. Anyway, I'd like to better understand what signal it is. I don't have much experience with poll; I more often use select().
> 
> On Jan 6, 2014, at 6:03 PM, Michel Pelletier <pelletier.michel at gmail.com> wrote:
> 
>> As the docs say:
>> 
>> http://api.zeromq.org/4-1:zmq-poll
>> 
>> "EINTR
>> The operation was interrupted by delivery of a signal before any events were available."
>> 
>> I assume if you want to ignore the signal then just looping back over zmq_poll() again would be fine.  You could also set a signal mask to ignore whatever signal is happening.
>> 
>> -Michel
>> 
>> 
>> 
>> On Mon, Jan 6, 2014 at 2:40 PM, Lindley French <lindleyf at gmail.com> wrote:
>> I'm trying to use zmq_poll() to test whether a TCP dealer or an inproc pull socket have anything available to read. However, sometimes I am getting an EINTR error. This appears to be because the poll() function is returning -1. However, no bits are set in revents for either descriptor, so I'm not sure what's going on.
>> 
>> Any suggestions?
>> 
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> 
>> 
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140107/af022148/attachment.htm>


More information about the zeromq-dev mailing list