[Vm-dev] unix nameToAddr() function appears to not work on Raspbian?

tim Rowledge tim at rowledge.org
Mon Sep 21 17:17:17 UTC 2015


On 21-09-2015, at 5:27 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> 
> It’s well-known that gethostbyname(gethostname()) won’t reliably work (e.g. http://tinyurl.com/d6e7gjl).

Sigh. It never ceases to amaze me just how clever we can collectively be at making life annoying for ourselves. Anyone would think that the entire point of modern operating systems was to make life difficult.

> python -c "import socket; s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); s.connect(('8.8.8.8', 80)); print(s.getsockname()[0]); s.close()"
> 
> I tried that on a Linux and OS X, works on both. We should be able to do that in Squeak using a UDP socket, no?

I guess that might have to be done for a next release. This release will just have to be fixed in pubs.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- HARLEZ-VOUS FRANCAIS? - Can you drive a French motorcycle?




More information about the Vm-dev mailing list