On Sat, Nov 03, 2001 at 08:04:53AM -0800, James Morrison wrote:
>  It seems anytime I use sethostname(), in hostname or in my own
> program.
> 
> int main() {
>   sethostname("me",3);
>   printf("%i:%s\n",errno,strerror(errno));
> }
> 
> sethostname always returns bad file descriptor.

Are you checking the return value of sethostname?  Most (all?)
functions don't set errno unless there's an error, so it'll contain
whatever it had before if you don't reset it to 0.

-- 
Adam Olsen, aka Rhamphoryncus

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to