Re: Alternative to bootstrap_register?
Re: Alternative to bootstrap_register?
- Subject: Re: Alternative to bootstrap_register?
- From: Uli Kusterer <email@hidden>
- Date: Wed, 18 Nov 2009 16:07:34 +0100
On 17.11.2009, at 19:16, Jean-Daniel Dupas wrote: Does anyone know what paragraph 3) means to achieve and how, possibly with a short example?
To be noted, the open source CFMessagePortCreateLocal() still uses bootstrap_register years later after the API has been marked as deprecated.
Note really. It uses bootstrap_register2 which is a SPI and not deprecated.
Doesn't help us, we can't use an SPI either :-/ Now it depends what you want to do. If you plan to register and checkin the service in the same process, it can be done using the NSMachBootstrapServer API.
They're separate processes, sadly. Now if you want to register the service, lookup, and wait that an other process checked-in, it's a little more complex.
An approach may be to use a temporary launchd service. The new ServiceManagement Framework provide a way to dynamically register a launchd service (SMJobSubmit). You can register your service with "LaunchOnlyOnce" flag set so it will be automatically unregistred just after launch.
But then we wouldn't be able to locate the service if it is already running. :-(
Cheers, -- Uli Kusterer "The witnesses of TeachText are everywhere..."
|
_______________________________________________
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