Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Alternative to bootstrap_register?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative to bootstrap_register?

Sorry for the repost, just occurred to me.

Since you are launching a server process directly, have you considered the typical unix solution of using pipes to communicate with the child. See popen(3), which is a single API that that allows a parent to create a child and connect to it.


On 2009-11-19, at 8:54 AM, 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.
> Finally if it doesn't work I know for a fact that it will work with unix-domain sockets.
> Godfrey

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

 >Alternative to bootstrap_register? (From: Uli Kusterer <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Damien Sorresso <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Uli Kusterer <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Godfrey van der Linden <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.