[zeromq-dev] czmq: zmq_poll() return value on interrupt = 0

Andy Ballingall TF ballingall at thefoundry.co.uk
Mon Dec 31 11:15:53 CET 2012


The behaviour isn't as straightforward as I originally stated, so I need to
dig further.



On 31 December 2012 09:49, Andy Ballingall TF
<ballingall at thefoundry.co.uk>wrote:

> Hi,
>
> In the zmq guide here:
> http://zguide.zeromq.org/page:all#The-CZMQ-High-Level-API it states that
> zmq_poll should return with -1 if an interrupt is received, but for some
> reason this isn't happening. It does return on interrupt immediately, but
> with 0 as the return value.
>
> The socket being polled was created with a call to zsocket_new(), and the
> zmq context was created with a call to zctx_new().
>
> I know that czmq registers a function to handle interrupts, and I can
> verify that this is being called on interrtupt because the global variable
> zctx_interrupted is set to true, so I can use this.
>
> I just wanted to clarify whether there this is a typo in the documentation
> or perhaps an indication that I've not setup everything correctly.
>
> The application in question is just a small command-line program running
> on linux with the interrupt generated with a Ctrl-C to the shell.
>
> Andy
>
>
>
> --
> Andy Ballingall
> Senior Software Engineer
>
> The Foundry
> 6th Floor, The Communications Building,
> 48, Leicester Square,
> London, WC2H 7LT, UK
> Tel: +44 (0)20 7968 6828 - Fax: +44 (0)20 7930 8906
> Web: http://www.thefoundry.co.uk/
>
> The Foundry Visionmongers Ltd.
> Registered in England and Wales No: 4642027
>



-- 
Andy Ballingall
Senior Software Engineer

The Foundry
6th Floor, The Communications Building,
48, Leicester Square,
London, WC2H 7LT, UK
Tel: +44 (0)20 7968 6828 - Fax: +44 (0)20 7930 8906
Web: http://www.thefoundry.co.uk/

The Foundry Visionmongers Ltd.
Registered in England and Wales No: 4642027
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121231/e37ffd12/attachment.htm>


More information about the zeromq-dev mailing list