call gethostname directly via the socket API vs. invoking hostname via the shell