[zeromq-dev] duped sockets and fork
Matt Connolly
matt.connolly at me.com
Mon Sep 16 15:13:30 CEST 2013
Hi Selim,
I don’t have any ideas yet about why the parent would stop sending messages after forking a second child.
Is it possible to reproduce this in a simple test case?
And when the no route to host error occurs, is that an assertion? If so, can you provide a stack trace?
-Matt
On 14 Sep 2013, at 6:43 am, Selim Ciraci <ciraci at gmail.com> wrote:
> Hi Matt,
>
> Thanks for your reply. I have actually found out about your patch after the email. I have updated zmq to head from github and tried with my program. The parent sockets seems to have closed. But the problem is every now and then I get "no route to host" errors in zmq_send. This happens usually when:
> parent forks a child, child calls zmq_term(parent_context) does work and then terimantes (closes its context).
> parent in parallel uses parent_context, does work, learns the child has terminated, forks a new child child2.
> child2 zmq_term(parent_context) does work and then terimantes (closes its context).
> after child2 terminates parent cannot receive messages. Even though the parent is active, zmq_send in the server fails with no route to host.
>
> I have no idea why this fails. Any ideas what might be causing this?
>
> Best,
> Selim Ciraci
More information about the zeromq-dev
mailing list