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:34 AM, Jean-Daniel Dupas wrote:
> Le 19 nov. 2009 à 00:18, Damien Sorresso a écrit :
>> On Nov 18, 2009, at 1:59 PM, Godfrey van der Linden wrote:
>>> Sorry for the repost, just occurred to me.
>>>
>>> Since you are launching a server process directly, have you considered the typical unix solution of using pipes to communicate with the child. See popen(3), which is a single API that that allows a parent to create a child and connect to it.
>>
>>
>> We're trying to discourage projects from spawning their own child processes.
>
> What if you need a child per work ?
>
> A real life example is decoding a movie in a 64 bits application. QuickTime decoders only works on the main thread and in 32 bit process (I know there is some kind of hacks to use them from other threads but they don't work most of the time). So, you have to spawn a child per movie (like QTKit does).
>
> Is there a clean way to accomplish this task using launchd ?


launchd doesn't provide support for multiple job instances currently. We are very aware of this need, however, so don't take this to mean that we see that use case as outside of our model.

For now though, you can sort of achieve this by using the ServiceManagement API (in Snow Leopard) to submit unique-ified jobs to launchd on-the-fly.
--
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: Jean-Daniel Dupas <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.