On 24 oct. 2010, at 20:03, eveningnick eveningnick wrote:

> 
>> Not great but should work.
>> Better would be to use LaunchServices, if not possible I would use 
>> SMJobSubmit() (ServicesManagement framework).
> Could you please explain why? What steps do i omit, if using fork/exec?

LaunchServices / SMJobSubmit will directly do the right thing for you (launch 
the process in the correct context).
No need to double fork and kill the parent.
In Mac OS X, using daemon(3) or doing the moral equivalent by calling fork() 
and having the parent process exit() is discouraged in favor of using launchd. 

Note that SMJobSubmit if the equivalent API of the launchctl command mentioned 
by Greg.


Thomas_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to