bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sethostname()


From: Marcus Brinkmann
Subject: Re: sethostname()
Date: Sat, 3 Nov 2001 17:47:11 +0100
User-agent: Mutt/1.3.23i

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);

This should be "me",2, if I am not mistaken.  You don't want to write the
trailing zero to the file.

>   printf("%i:%s\n",errno,strerror(errno));
> }
> 
> sethostname always returns bad file descriptor.

If it really fails, debug it!  Install libc0.2-dbg, download the X sources
and set a break point on _hurd_set_host_config (file libc/hurd/set-host.c).

Thanks, 
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org address@hidden
Marcus Brinkmann              GNU    http://www.gnu.org    address@hidden
address@hidden
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]