Re: Best Strategy to Control iTunes
Re: Best Strategy to Control iTunes
- Subject: Re: Best Strategy to Control iTunes
- From: Kyle Sluder <email@hidden>
- Date: Thu, 2 Apr 2009 11:18:14 -0400
On Thu, Apr 2, 2009 at 9:22 AM, Ammar Ibrahim <email@hidden> wrote:
> To sum up, you mean I should use osascript in a separate process? How can I
> achieve that, and how can I have this separate process communicate back to
> the main process?
NSTask creates child processes. The general term is "forking",
because the fork(2) syscall is how one actually tells the kernel "make
a new child process for me, please."
Communication between your parent and child process falls under the
umbrella term Inter-Process Communication (IPC). There are a couple
of IPC primitives in OS X: Mach ports, UNIX signals, UNIX pipes,
sockets, and Apple Events are all primitives*. You can choose
whichever suits your needs best.
Hopefully these terms will help inform your research.
--Kyle Sluder
* They're "primitive" at some layer of abstraction. Under the hood,
one "primitive" might actually be implemented on top of another.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden