-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 28/05/14 09:42, Li Ke wrote: > When I use one same thread to call foo, it works OK, and the recvfd > is an positive integer (recvfd > 0); However, while I try to put > foo in another thread, the ret of nn_getsockopt return 0 but the > recvfd is always 0. Another thread than what? There's only one thread in the example you've posted. Do you have a minimal test case? Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJThZd7AAoJENTpVjxCNN9YVC4H/0xuiqAwLZjvwPAbCttpknlm 3tGR8HXXttE3NQsbtr6hAk/Ucswq/7lRJHWvG2Wioa/4/dhxcBun00MtgCF8KTsW owKwOctao8ZGPN+F9eHVCfLXV7cUXEQ+B/udij2kpY7U07gS+BqtIhrZ99QFoopX C9nYfMhj0kPBPBblSL8QMQYKn7pXYS/ua3RZyuNiy5sUFFOFMQWlYq1l/0QwGjKj MRnCvBva+NAQ7QSNnZ2oixtvoOHhhckGjKG+zxCiHF7xDPJfG4U7kJ9XEGEiIjrK ikojgwlhHf5cFAnf4LjpMSNpcz6hRcodQh1OGnu1JPKBaSagVkn16fTdephJz0s= =2IQ7 -----END PGP SIGNATURE-----