Re: Launchd Agents, Login Items, and Tiger
Re: Launchd Agents, Login Items, and Tiger
- Subject: Re: Launchd Agents, Login Items, and Tiger
- From: email@hidden (Peter Seebach)
- Date: Tue, 13 Nov 2007 20:25:36 -0600
In message <email@hidden>, Mike Kobb write
s:
>I'm trying to work around the documented limitation in launchd (on
>Tiger) that prevents it from being used to launch a process at user
>login. The limitation, as I understand it, is that there's no way to
>prevent launchd from launching the process even if the user logs in
>via a non-GUI method like ssh.
Ahh!
>So, I guess what I'm asking is if, *once I have been launched as a
>Login Item*, I can leverage launchd to simply re-launch me properly if
>I should crash. Or, does a subsequent launch-on-crash suffer the same
>basic problem that prevents launching me at login in the first place?
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.
>PS: "KeepAlive" is the 10.5 option. In 10.4, it was "OnDemand", which
>is now deprecated.
It is very sad that I should have gotten this backwards.
-s
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden