At 5:10 PM -0400 5/24/12, Jeremy Lavergne wrote:
> I'd like to add a check to my in-progress portfile, testing
whether the main server process ("mythbackend") is running and
refusing to deactivate if so. The reason is that launchd will keep
trying to restart the missing program every 10 seconds--apparently
without end! Floods the console log with messages even though there
is little other harm.
You can set the delay and maximum number of attempts.
I see the setting for delay (ThrottleInterval) but I can't find
anything about a max number of attempts in the man page for
launchd.plist.
> I've searched around a bit and can't find any ports that seem to
do that sort of test. Could someone point me to some sample code?
I suppose something like 'ps -Ac | grep interestingprogram'?
I'm not sure, but have you checked with `launchctl list` to see if
its output is useful?
Could use launchctl list but that would only tell if it was launched
under launchd. I might as well warn regardless of the way it was
started.
Craig
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev