[squeak-dev] finding the unix localhost name

Vanessa Freudenberg vanessa at codefrau.net
Thu Mar 30 22:10:16 UTC 2023


On Thu, Mar 30, 2023 at 2:19 PM Eliot Miranda <eliot.miranda at gmail.com>
wrote:

>
> On Thu, Mar 30, 2023 at 11:30 AM Vanessa Freudenberg <vanessa at codefrau.net>
> wrote:
>
>> While all of that is true, there is a difference between a routable name
>> (which obviously is interface-specific) and the standard host name for the
>> current machine, which is for humans, not for other machines. That's what
>> the primHostName is supposed to answer. It should be equivalent to running
>> `hostname -s` on a unix command line. It is useful, as long as users are
>> aware of what it actually refers to.
>>
>> Now the actual implementation of primHostName across VMs is not unified
>> because (I believe) the intention of that primitive was not
>> well-documented. On my machine (macOS VM) it answers the IPv4 address of
>> the first external interface, apparently, which is not what I think it
>> should answer.
>>
>
> Then we should fix it, and document the intent of the primitive :-)  Your
> definition makes sense to me.
>

I got confused, the primitive actually does what it's supposed to (on macOS
at least). We're just not using it by default, that was Tim's observation.

Vanessa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230330/bd7306c0/attachment-0001.html>


More information about the Squeak-dev mailing list