todo
来自「这是一个完全开放的」· 代码 · 共 18 行
TXT
18 行
- Make sure /etc/hosts gets used before we go to the network. It seems that under some (all?) circumstances, the res_* functions are DNS ONLY - ie, they ignore /etc/nsswitch.conf and /etc/hosts. I can't confirm this - documentation on the resolver is sketchy (no surprise there). If res_* can't be made to use /etc/nsswitch.conf and /etc/hosts on ALL systems, then we have two options: - Load /etc/nsswitch.conf and /etc/hosts ourself, and search there before hitting the network. - Don't do SRV lookups at all if there's no nameserver specified in /etc/resolv.conf, and use gethostbyname() for the A lookup. Both these suck.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?