[zeromq-dev] zmq_close() has no effect after fork()

John Khvatov ivaxer at gmail.com
Fri Oct 12 10:33:21 CEST 2012


Hello Pieter,

I don't need ZMQ in forked process, but I need forked processes after creating context in parent process. I don't want that the forked process holds ZMQ resources. So, if parent has created context and has retain resources, why it can't release them after fork()?


On Oct 11, 2012, at 1:04 PM, Pieter Hintjens wrote:

> On Wed, Oct 10, 2012 at 5:52 PM, John Khvatov <ivaxer at gmail.com> wrote:
> 
>> Yep. But ZMQ does not allow to call zmq_close()/zmq_term() in child process. It is wrong...
> 
> Why not create the context in the forked process where you need it.
> I.e. after forking, not before.
> 
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-- 
WBR, John Khvatov




More information about the zeromq-dev mailing list