process-local override of name resolution?
问题 I have test code that I want to have a couple of hostnames resolve to the loopback while testing. When deployed, this code will use the normal system name resolution as appropriate. Test and deployment host are recent linux distros (SLES11SP1, e.g.). I'd like to override hostname resolution for a single process, without being superuser. Is there a way to manipulate the nsswitch / hosts behavior in such a narrow fashion? Yes, of course I could override the hostnames themselves, but I prefer