[launchd-dev] SMJobSubmit( ) fails but no error is returned

Karl Moskowski kolpanic at voodooergonomics.com
Wed Jan 20 12:05:08 PST 2010


Thanks to Damien for finding the problem. In case anyone else encounters the same thing, here's the summary.

During development, I had manually unloaded the agent using "launchctl unload -w". This had the effect of setting a disabled key under the job's identifier in the launchd database at:
	/var/db/launchd.db/com.apple.launchd.peruser.NNN/overrides.plist (where NNN is your user ID number, e.g. 501)
With that setting in place, SMJobSubmit() returned false, but the outError argument was NULL.

Manually editing overrides.plist to remove the offending entry allowed SMJobSubmit() to work. I've filed rdar://7561469 in case anyone else wants to file a bug.

----
Karl Moskowski <kolpanic at voodooergonomics.com>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3692 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20100120/6c89bc36/attachment.bin>


More information about the launchd-dev mailing list