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 [EMAIL PROTECTED]
Marcus Brinkmann              GNU    http://www.gnu.org    [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de

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

Reply via email to