bug-hurd
[Top][All Lists]
Advanced

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

What I know of sethostname()


From: James Morrison
Subject: What I know of sethostname()
Date: Sat, 3 Nov 2001 20:20:45 -0800 (PST)

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
/etc/hostname.
        Then __io_write is called, with as (new,name,len,0,&nwrote)
        I noticed nwrote a mach_msg_type_number_t didn't change from
        before io_write was called and after.  Also it's this
io_write
        that is finding the bad file descriptor.  I haven't found the
        sources for the __io_write function yet.  This __io_write
        finds a bad file descriptor no matter if /etc/hostname exists
or
        not.

=====
James Morrison
   University of Waterloo
   Computer Science - Digital Hardware
   2A co-op
http://hurd.dyndns.org

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com



reply via email to

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