Hi, On Tue, Apr 29, 2008 at 11:38:27PM +0200, zhengda wrote:
> When I look into the code of servers in Hurd, I find almost every > server calls get_privileged_ports() to get the master device port and > the privileged host port. Indeed. > and get_privileged_ports() seems to invoke a system call of mach. Why do you think so? The way I read the implementation of __get_privileged_ports() in glibc (hurd/privports.c), it gets the ports from the proc server in the normal case, not from Mach. (There is a special case for the very first process started by Mach on system boot: In this case, __get_privileged_ports() just copies the ports from the task itself -- the intial task got the real ports directly from Mach on startup...) > If servers run in subhurd, do they get the same port as they run in > the main Hurd? Obviously not... As you probably know by now, the device master port is proxied by the boot program. (Which passes the pseudo device master port to root FS server in the subhurd, which in turn passes it to the subhurd's proc server I guess...) -antrik-