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?

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. :-(

-- 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

 >Alternative to bootstrap_register? (From: Uli Kusterer <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Jean-Daniel Dupas <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.