Mailing Lists: Apple Mailing Lists

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

Re: Launchd Agents, Login Items, and Tiger



Okay, thanks much! It does seem obvious now that I see it! :-) I can keep track of how quickly the app quits so that I can abort if it seems to be dying on launch, and I guess I'd just have the script check the return value of the program for a "normal" result to terminate the loop if I need to actually shut down the process.

--Mike

On Nov 14, 2007, at 8:29 AM, Dave Zarzycki wrote:

On Nov 13, 2007, at 6:25 PM, Peter Seebach wrote:

Hmmm.  You might be able to do something clever.

If using launchd won't cut it, is there an alternative approach for
not just launching me at login, but also re-launching me if I crash?

#!/bin/sh while true do MyProgram done

Obviously, I don't anticipate crashing, but the project requirements
I've been handed specify automatic re-launching of this background
helper app, and I'd prefer to find a way to satisfy the requirements
rather than argue to have the requirement removed.

Agreed. It makes sense -- but I don't know of a good way to do it.

I think Peter's approach is the best option for Tiger automatic relaunch of programs within the session.


I can think of other alternatives, but they are messier.

davez
_______________________________________________
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
References: 
 >Re: Launchd Agents, Login Items, and Tiger (From: email@hidden (Peter Seebach))
 >Re: Launchd Agents, Login Items, and Tiger (From: Dave Zarzycki <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.