• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Alternative to bootstrap_register?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Alternative to bootstrap_register?
      • From: Damien Sorresso <email@hidden>
    • Re: Alternative to bootstrap_register?
      • From: Alastair Houghton <email@hidden>
    • Re: Alternative to bootstrap_register?
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: gcc compiler error: "Ignoring attempt to re-define symbol"
  • Next by Date: Re: Alternative to bootstrap_register?
  • Previous by thread: Re: gcc compiler error: "Ignoring attempt to re-define symbol"
  • Next by thread: Re: Alternative to bootstrap_register?
  • Index(es):
    • Date
    • Thread