[erlang-questions] reliably figure out hostname

Tim Watson <>
Thu Aug 2 16:33:37 CEST 2012

On 2 Aug 2012, at 09:40, Gustav Simonsson wrote:

> {ok, LocalHostName} = inet:gethostname().
> inet_res:gethostbyname(LocalHostName).
> You get a hostent record back which has the FQDN.

Cool thanks for pointing that out Gustav, I'll give this a try on the various machines we had troubles with.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120802/1317734e/attachment.bin>

More information about the erlang-questions mailing list