[launchd-dev] LAUNCH_KEY_GETJOB returns MACH_PORT_NULL?

Damien Sorresso dsorresso at apple.com
Fri Aug 27 12:34:21 PDT 2010

On Aug 27, 2010, at 12:27 PM, Dave MacLachlan wrote:
> Hey all..
> So when I send a LAUNCH_KEY_CHECKIN message, I get a dictionary back with all the mach ports filled in for my mach services. However, if I send a LAUNCH_KEY_GETJOB from an external process I get MACH_PORT_NULL for all of the mach ports. I can look them up by using bootstrap_look_up, or NSMachBootstrapServer, but I was wondering what the reasoning was behind not returning them from a LAUNCH_KEY_GETJOB lookup? It appears to be an intentional design decision.
> (This is what I'm seeing on 10.5 at least. Perhaps it's different on 10.6?)

Please don't use those APIs. Use bootstrap_check_in() and bootstrap_look_up() instead.
Damien Sorresso
BSD Engineering
Apple Inc.

More information about the launchd-dev mailing list