in reply to /etc/hosts is not evaluated after modification on Linux
My guess is that on Linux, the call to gethostbyname is cached somewhere outside the resolver and the updated information does not reach your program. I don't know enough about Linux to know how to make the C library, or the resolver deliver you the updated information immediately.
|
|---|