Front page | perl.perl5.porters |
Postings from February 2000
Re: fixing Sys::Hostname
Thread Previous
|
Thread Next
From:
Nick Ing-Simmons
Date:
February 8, 2000 08:23
Subject:
Re: fixing Sys::Hostname
Message ID:
200002081623.QAA28038@tiuk.ti.com
Tom Christiansen <tchrist@chthon.perl.com> writes:
>>> % grep localhost /etc/hosts
>>> 127.0.0.1 localhost
>
>>Which is exactly my point ;-) there is no alias there, just the one name
>>and that makes 'localhost' the official name of the address.
>
>But I've never heard of "localhost" ever being anything but
>"127.1" as an address. It's extremely expected.
And it still is with the alias scheme - I am not suggesting changing
that or the existance of name 'localhost'.
I just point out if its "official" name (from /etc/hosts) was
what gethostname() would return then there would not need to
be a gethostname() API ;-) - you would just use gethostbyname()
to get official name of well know 'localhost' alias.
>>and yours "should" be :
>
>>127.0.0.1 chthon.perl.com chthon localhost
>
>I think not.
I know this is a non-starter in UNIX world - but it could have been done
that way...
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.
Thread Previous
|
Thread Next