On Sun, Jun 12, 2011 at 12:08 PM, Luc Heinrich <[email protected]> wrote:

> The assertion(s) occur(s) when pressing ctrl-C, which I assume you probably 
> did to exit this sleeping-and-doing-nothing test case and which I assume you 
> did not see, which would mean that OMQ/3.0 does not have the problem ? :)

I've tested this on Linux, 0MQ/2.1.7, and it doesn't provoke any error.

However doing any real work in the signal handler is dangerous. You
simply cannot rely on memory allocations, or the stack, working
sanely. One safe way of handling Ctrl-C is to set a global variable,
which you can then test in your code. This is how CZMQ does it.

Conclusion: your error messages are the system-dependent result of
corrupted 0MQ state cased by trying to do 0MQ calls from within the
signal handler.

-Pieter
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to