Re: Alternative to bootstrap_register?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Damien Sorresso