(2) obtain the task port in the child, prior to execve (the child
has
self rights)
(3) send the port from the child to the parent process (the parent
can
then use the port)
How does this part work? I can't figure out how to get a
communication
channel from the child to the parent that can transfer a port right.
You have to send it in a Mach message; specifically, access rights to
a port are granted to a task by sending a "send right" or "receive
right" message to the task you want to be able to use the port;
Yes, I understand that. But how does the child send a Mach message
to the parent? How does it get a send right for a port for which the
parent
owns the receive right? As far as I can tell, the child doesn't have
the
parent's task port, nor any other port the parent had before fork().
You create a bootstrap port (see launchd source code, bootstrap.c).
For how port rights get Exchanged (I only gave you the 50,000 foot
view previously).
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden