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?).

This is not necessary.
If it is not running, the main app should start it via SMJobBless.
If it quits (or crashes) the main app may start it again (no automatic restart 
necessary).

What launchd options are needed for this?


Another question: 

[NSRunningApplication runningApplicationsWithBundleIdentifier: @"name of helper 
tool" ]
returns an empty array. 
But Activity Monitor shows "name of helper tool"  as running and my main app 
can communicate with it.
Is there some other way to find out whether it is running?

In the case that the main app cannot communicate with it (because something 
might be screwed up) I want to know whether it has died or not.

Gerriet.


_______________________________________________

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