Alternative to bootstrap_register?
Alternative to bootstrap_register?
- Subject: Alternative to bootstrap_register?
- From: Uli Kusterer <email@hidden>
- Date: Tue, 17 Nov 2009 18:27:40 +0100
In <servers/bootstrap.h> there is the following note about the bootstrap_register() call:
* This API is deprecated. Old scenarios and recommendations:
*
* 1) Code that used to call bootstrap_check_in() and then bootstrap_register()
* can now always call bootstrap_check_in().
*
* 2) If the code was registering a well known name, please switch to launchd.
*
* 3) If the code was registering a dynamically generated string and passing
* the string to other applications, please rewrite the code to send a Mach
* send-right directly.
In case of suggestion #3, the application that used to call bootstrap_register only has the pid of the target application to which to "send a Mach send-right directly".
In order to send a Mach send right however one needs a send right itself to a port to which the target application has receive rights. In order to get that send right, the target application itself also needs to send this application a Mach send right, however in order send that send right it also needs a send right to send it and the loop never ends.
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.
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