> On 31 Jan 2022, at 19:22, Dieter Maurer <die...@handshake.de> wrote:
> 
> Michael Welle wrote at 2022-1-30 09:18 +0100:
>> ...
> The machine this is running on regularly switches
>> its network configuration without restarting the Python application. Now
>> it turns out that the application is still using an old, outdated dns
>> server after such a network configuration switch.
> 
> It is unlikely that Python performs the host -> IP address translation
> itself. Almost surely, the translation is delegated to functions
> of the underlying C runtime library, e.g. "gethostbyname".

And glibc does not have the ability to reload the /etc/resolv.conf I recall.
If you rely on that you will need to change to using something like dnsmasq or 
systemd-resolved so that resolv.conf uses localhost.

Barry


> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to