Even though the API has been open since Mac OS X Leopard, there\'s surprisingly, and unfortunately, very little documentation on how to correctly use SMJobBless()
SMJobBless()
I wrote a blog post on this a few months ago, which included a cleaned up version of Apple's SMJobBless sample. Might help...
http://www.bornsleepy.com/bornsleepy/os-x-helper-applications