>>>>> Geoffrey S Knauth writes:
Geoffrey> Joe Carter suggested:
>> Change the order of localhost and the real host name in /etc/hosts.
>> (real first!). The getlocalhost just seems to get the first it finds.
Geoffrey> I tried this straightforward workaround, as silly as it seemed, and
Geoffrey> the "GNU/Linux JDK InetAddr.getLocalHost() on glibc bug" vanished
Geoffrey> immediately. I'm wondering why someone might have coded things this
Geoffrey> way, since ordinarily people don't change their /etc/hosts file every
Geoffrey> time they switch between interfaces (e.g., ppp0 at home, eth0 at
Geoffrey> work). So I'd consider this a glic bug, unless it turns out the
Geoffrey> code in getlocalhost() has a reason behind it.
Geoffrey,
you mailed this to bug-glibc totally out of context. If you think
it's a glibc bug, then please provide a real bug report (the best way
is to use the glibcbug script):
- What's your problem?
- How did you solve it?
- Which glibc version are you running?
- How can I reproduce it?
- What is the code in getlocalhost doing?
- ...
Please supply if possible a small C program showing the bug - trying
to fix a bug which might be in JDK, glibc or whatever might be
impossible.
Andreas
--
Andreas Jaeger [EMAIL PROTECTED] [EMAIL PROTECTED]
for pgp-key finger [EMAIL PROTECTED]