On Sep 15, 2013, at 2:02 AM, Gerriet M. Denkmann wrote:

>>> I have a helper tool (started via SMJobBless from the main app).
>>> 
>>> Its launchd.plist contains (no idea why, probably I copied this from some 
>>> sample code):
>>> LaunchOnlyOnce = YES
>>> RunAtLoad = YES
>>> OnDemand = NO    
>>> 
>>> The problem: it runs even when the the main app has never asked it to run.
>>> Obviously it gets started automatically on login (or even directly after 
>>> reboot?).
>> 
>> Yep. You asked it to.
> Which of the 3 options above triggers this behaviour?


RunAtLoad=YES. It launches when the launchd job loads.

OnDemand=NO makes sure it stays open. (And is also an old key which is no 
longer recommended for that use.) It does seem to conflict with LaunchOnlyOnce 
though. Based on your other email it sounds like OnDemand is winning.



> Following your advice I got rid of all of them and all was well.
> 
> But then I made some changes in the main app as well as in the helper tool 
> and nothing worked anymore.
> Turns out that still the old helper tool (which is no longer compatible to 
> the new main app) was running. 
> 
> And nothing did change this:
> Quitting the helper tool via Activity Monitor,
> installing a newer version via SMJobBless,
> Deleting: /Library/PrivilegedHelperTools/name.of.Tool,
> Deleting: /Library/LaunchDaemons/name.of.Tool.plist ,
> and any random combination thereof.
> 
> The only way to get the new version was to log out, log in.

Stopping the job with launchctl would work.



--
Seth Willits





_______________________________________________

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

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

Reply via email to