Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Launchd Agents, Login Items, and Tiger



Hi,

Let me start by saying that I've read the excellent TN2083, but I didn't find that it answered my question.

Here's the problem I'm trying to solve. I hope that perhaps somebody can help suggest a solution (and/or tell me if the solution I propose below will work).

I have a little user agent application (written with Cocoa) that runs as a primarily-faceless application (it has a Status Item in the menu bar, but that's about it). It will be installed per-user, and needs to launch when the user logs in to a normal GUI session. As well, if it should crash, I would like it to be re-launched. The application needs to support Tiger and Leopard.

So, obviously, I can do this with launchd on Leopard. I can get launched at login with a Login Item on Tiger, but I don't get the automatic restart.

So, what I'm wondering is: is there any way to use launchd to give me the automatic restart that I need, on Tiger? One thing I had thought of doing is to have myself launched as a Login Item, but once launched, to *add myself* to launchd's list so that if I should crash, I'll get re-launched.

I haven't tried this solution yet, so perhaps somebody can save me a little time if you already know it won't work.

Any help (including alternative suggestions) is much appreciated.

Thanks,
--Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.