What I know of sethostname()

2001-11-03 Thread James Morrison
Hello, from what I can get from the sources and gdb sethostname(name,len) calls _hurd_set_host_config("/etc/hostname",name,len) then _hurd_set_host_config gets the port of /etc, creates a port for hostname if neccesary, or gets the old port for /e

Re: sethostname()

2001-11-03 Thread Marcus Brinkmann
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(

Re: sethostname()

2001-11-03 Thread Adam Olsen
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 che

sethostname()

2001-11-03 Thread James Morrison
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. I've got python2.1 working, I didn't link to threads at the right place. Now I've got python