KURL::isLocalFile uses gethostname

Simon Hausmann hausmann at kde.org
Thu May 1 09:32:03 BST 2003

On Wed, Apr 30, 2003 at 10:07:41PM -0400, Dawit A. wrote:
> May I inquire what the purpose of adding code that performs hostname lookups 
> in KURL::isLocalFile is ?  Is it for the sake of compatibility with the XDND 

It's not that gethostname results in a slow dns lookup or something.
At least on glibc gethostname costs one uname() syscall 'only' .
Maybe even that could be cached (assuming the change of hostname to
be an exceptional case here) .


More information about the kde-core-devel mailing list