Closed
Description
I was running an application using libzmq on solaris and it was dumping core when starting. I traced the problem to zmq::get_peer_ip_address() in ip.cpp, where getpeername() libc function fails with errno set to EINVAL. libzmq considers EINVAL to be consequence of a bug in its implementation thus it dumps core. However open group specification explicitly mentions EINVAL among valid errno codes for getpeername and it should be generated when the peer has closed the connection (http://pubs.opengroup.org/onlinepubs/009695399/functions/getpeername.html).
It seems to me that libzmq should be fixed and EINVAL should be taken out from the assert in get_peer_ip_address.
Metadata
Metadata
Assignees
Labels
No labels