[launchd-dev] WatchPaths

Quinn eskimo1 at apple.com
Thu Feb 18 03:11:20 PST 2010


At 15:47 -0600 17/2/10, Errol Sayre wrote:
>For a launch agent with multiple watch paths, how does one pass the 
>path that fired the event to the program arguments?

Your agent should monitor all of the paths it's been configured for. 
Otherwise it would be subject to a race condition:

1. user touches path A

2. launchd launches the agent with path A, but it takes a while to start up

3. user touches path B

4. agent runs and processes path A

5. path B is never processed

S+E
-- 
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


More information about the launchd-dev mailing list