[zeromq-dev] How to close a pipes peer?

Goswin von Brederlow brederlo at q-leap.de
Sun Jul 17 02:50:01 CEST 2022


Hi,

I'm trying to fix the FD leaks in router sockets with HANDOVER.

This happens in

    zmq::router_t::identify (pipe_t *pipe_, bool locally_initiated_)

right at the end with a call to

    old_pipe->terminate (true);

This terminates the obsolete old_pipe. But it does nothing to the peer
of that pipe, which actually holds the underlying socket FD. The FD is
then ignored and not closed until the router socket gets closed.


My question now is: How do I get the peer of old_pipe to terminate?

MfG
    Goswin


More information about the zeromq-dev mailing list