[launchd-dev] privileged process install

Martin Grider martin at code42.com
Tue Jan 31 14:41:10 PST 2012


I found the problem looking through the archives for this list. (Thanks to Jerome Laurens for posting a fix to his own problem.)

Essentially, my com.myCom.myApp.helper was present in /private/var/db/launchd.db/com.apple.launchd/overrides.plist (and set to disabled true).

I even know how this happened. Yesterday, after I got everything working, I copied the bits of the uninstall script from the BetterAuthorizationSample project that I felt were relevant. I don't know if that script works or what, but essentially making the following call:

sudo launchctl unload -w /Library/LaunchDaemons/com.myCom.myApp.helper

...is what sets the disabled == true business. The fact that there is no way to find "reason 2" is just ridiculous in my opinion. And that sample project has (in my experience) done more harm than good. I should never have opened it. SMJobBless is the way to go.

-martin



On Jan 31, 2012, at 3:26 PM, Martin Grider wrote:

> I'm attempting to install a root process via the methods outlined in the SMJobBless sample project.
> 
> I got it working yesterday!
> 
> Then today I added a bunch of functionality, tried to add it again, and suddenly I get the following (in the console):
> 
> 1/31/12 3:17:08.594 PM launchdadd: FAILURE: Could not submit job to launchd.
> 1/31/12 3:17:08.594 PM launchdadd: FAILURE: Job com.myCom.myApp.helper could not be installed from /Users/grid/Library/Developer/Xcode/DerivedData/MyApp-gsejskndkewqemavjzmiltdpmzhs/Build/Products/Debug/MyApp.app/Contents/Library/LaunchServices/com.myCom.myApp.helper, reason 2.
> 
> Does anyone know what is this "reason 2"!?!?!? Googling for an hour has not helped.
> 
> Most of the things I did were adding linkages and dependencies in the project... only a minimal amount of code was written. I've tried unsuccessfully to get back to the state I was in yesterday. Any clues would be really appreciated.
> 
> Thanks in advance,
> -martin
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev



More information about the launchd-dev mailing list