[launchd-dev] Agent sometimes just stops working until unloaded/reloaded

Jerry Krinock jerry at ieee.org
Thu May 5 10:20:50 PDT 2011


It's been almost a year, with no reply, and I still see the problem, so I thought I'd ask again if anyone has ever seen a randomly-occuring bad state in launchd wherein a LaunchAgent with a WatchedPath will fail silently; i.e. not run its program when the WatchedPath changes, even though the ThrottleInterval since the last run has expired.  Unloading and reloading the agent immediately knocks it out of this bad state.  It's still pretty much the same as I posted last year:

http://lists.macosforge.org/pipermail/launchd-dev/2010-June/000774.html

Additional information is that it always seems to trigger correctly at least once after loading the job.  The second and third times seem to be critical; if it can make it through these, it will continue working for a long time.  Also, I think maybe the job is more likely to die if the WatchedPath is changed several times during my 300-second ThrottleInterval.

Any clues or suggestions to debug this would be appreciated.

P.S.  I sure wish there was an API whereby you could find out more about the current status of a job; i.e. information like "was triggered but is currently throttled", etc.  Or if it would make a peep when triggered during the throttle interval.

Sincerely,

Jerry Krinock



More information about the launchd-dev mailing list