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 Nov 19, 2009, at 1:15 AM, Alastair Houghton wrote:
> On 18 Nov 2009, at 23:18, Damien Sorresso wrote:
>> We're trying to discourage projects from spawning their own child processes.
>
> For the case where the processes that are trying to communicate are parent and child already, so they won't be running unless both of them are running, I can't see an obvious advantage to using launchd (versus just doing a bootstrap_check_in()), and while it isn't significantly more complicated to use it (especially on 10.6), I'm not certain I see the benefit.  Maybe I'm missing something?


bootstrap_check_in() is designed for on-demand job to obtain their receive rights from launchd. By using launchd, the requestor can simply send a message to a port to get its helper process running, rather than having to go through the fork(2)/exec(3) dance, installing a kevent to monitor for the child's death, respawning if the child dies prematurely, etc.

With launchd, you can just send a request and not have to worry about the process' lifecycle.
--
Damien Sorresso
BSD Engineering
Apple Inc.

 _______________________________________________
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

References: 
 >Alternative to bootstrap_register? (From: Uli Kusterer <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Damien Sorresso <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Uli Kusterer <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Godfrey van der Linden <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Godfrey van der Linden <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Damien Sorresso <email@hidden>)
 >Re: Alternative to bootstrap_register? (From: Alastair Houghton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.