Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.4: Automatically restart a crashed program' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Automatically restart a crashed program
Authored by: bluehz on Oct 08, '06 05:18:13AM

I have used this technique for over a year to keep Quicksilver running. WOrks fantastic! There has always been one issue I was trying to solve - when a shutdown or restart command is issued, all applications are quit including Quicksilver, but before the system has had time to restarts/shutdown, the daemons (incl Quicksilver) relaunch - thinking thats the right thing to do. No big deal - the system just quits the application again and shutdown/restart continues as usual. I just always thougt there must be some way to tell the launch daemon to "wait" x period of time before relaunching - hence giving time for the shutdwon/restart to complete without the daemon having time to realunch. There are some fields in the launchd config files for pause/wait - but I have tried setting them and they never seem to have any effect. I personally feel like there should be some mechanism built-in that recognizes a restart/shutdown command and doesn't even attempt to relaunch - but only Apple can fix that. Does anyone know a method to keep the daemons from relaunching during a restart/shutdown.

Also - in particular with Quicksilver - there is one annoyance when Quicksilver updates itself or plugins and requires a relaunch - the applications shuts down and relaunches itself. Unfortunately the system sees that also and launches the daemon to restart Quicksilver and then youhave two instances of Quicksilver running. Once agin - a minor annoyance, but something that I feel should be able to work properly.

[ Reply to This | # ]
10.4: Automatically restart a crashed program
Authored by: fredrikw on Oct 08, '06 02:48:02PM

I think you used a different feuture of launchd, to keep an application running. I decided to go for my approach because sometimes I want to quit an application withou restart. Monitoring the crashlog only restarts the application on a crash, hence solving all of your issues.


[ Reply to This | # ]