net_adm:names() failing

Vance Shipley <>
Mon Oct 4 02:22:26 CEST 1999


Magnus,

More investigation suggests that the problem is on the epmd
server side.  I began to suspect that the problem was at the
socket level and my research brought me to the SO_LINGER
socket level option.  This option is supposed to control what
happens when you close a socket that has pending writes on it.

I added in a setsockopt() call to set SO_LINGER but that didn't
help.  To check on this theory I put in a sleep(1) right before
the close.  This worked, net_adm:names() now returned correct
information.  However I can't get it to work through setting the
socket option for linger (one thing is that the timeout value
isn't documented anywhere, I don't know if it's seconds. ms, etc.).

The thing that is strange about this is that my WinNT machine can
get names off the Unixware epmd just fine without any changes.
Putting in the sleep in epmd before closing the socket definitely 
made it work from the Unixware erl shell though.

Hmmm...

	-Vance





More information about the erlang-questions mailing list