Re: Alternative to bootstrap_register?
Re: Alternative to bootstrap_register?
- Subject: Re: Alternative to bootstrap_register?
- From: Ed Wynne <email@hidden>
- Date: Wed, 18 Nov 2009 17:05:02 -0500
On Nov 18, 2009, at 4:54 PM, Godfrey van der Linden wrote:
I'm not 100% sure but I think that your child process inherits or
can be made to inherit the parents mach ports. So the trick I
envisage is
1> Parent create a right and make it inheritable (?)
2> Parent calls fork
3> Parent waits on a message
4> Calls exec with an argument of the inherited port id in hex I'd
guess
and rendezvous can not happen
This seems pretty reliable, if ports can be inherited across a
fork() which is a big if.
They can't, mostly...
Most people who do this swap out one of the fixed ports, like the
exception or bootstrap ports, which are inherited. The problem is that
these ports typically serve a useful purpose and need to fixed up, so
the child / parent must perform a hand-off exchange to recover the
real port. It can be done but its a lot of work.
Another method is to create a bootstrap subset for the child.
Finally if it doesn't work I know for a fact that it will work with
unix-domain sockets.
unix domain sockets can transfer mach_ports?
-Ed
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden