[zeromq-dev] czmq : mutiple init / shut down
brunobodin .
brunobodin at gmail.com
Fri Mar 24 12:16:34 CET 2017
Hi
I'd like to be able to perform mutiple czmq init / shutdown in a process.
This works without an issue in ZMQ (create/term context), but in CZMQ I
have the following issues :
(czmq is compiled as a windows dll)
* first I had to slightly modify the shutdown funtion to reset the ctx
pointer to null :
at line 265 of zsys.c :
if (s_open_sockets == 0)
{
zmq_term(s_process_ctx);
s_process_ctx = NULL; // add this so next zsys_init() does not assert
}
so that the next zsys_init works (or seems to...)
* now the crash is in the second shutdown, to be precise in
zmq::ctx_t::terminate , on the "delete this" line (line 215)
the test case is just
zsys_init()
zsys_shutdown()
zsys_init()
zsys_shutdown() // -> crash
I do not see where to look further, any hint appreciated !
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170324/106b25c4/attachment.htm>
More information about the zeromq-dev
mailing list