[zeromq-dev] [zeromq/2.0 - beginner's question] why do I get a seg fault?

Martin Sustrik sustrik at 250bpm.com
Mon Nov 16 18:26:41 CET 2009

> Another thing : currently the receiver program is killing my CPU because
> of the while loop. I wanted to use polling instead (with the right context
> initialization with the ZMQ_POLL flag and the appropriate call to zmq_poll),
> but I couldn't because "zmq_pollitem_t" is undefined in zmq.h...

Why not use blocking recv? That would solve your problem nicely without 
a need for polling. Ctrl+C signal will be delivered to your application 
in any case (0MQ doesn't mess with signals).


More information about the zeromq-dev mailing list