[launchd-dev] WatchPaths Indicator of triggering path?

Kevin Van Vechten kvv at apple.com
Wed Aug 13 00:37:53 PDT 2008


On Aug 12, 2008, at 11:36 PM, Benjamin Burke wrote:

> When an agent is run as the result of a watched path being modified,
> does launchd provide the agent with the path that triggered it? For
> example, imagine that I have the following plist which identifies 3
> watchpaths:
[...]
> 	<key>WatchPaths</key>
> 	<array>
> 		<string>/some/path</string>
> 		<string>/return/of/the/path</string>
> 		<string>/revenge/of/path</string>
> 	</array>

No, I don't think the path that triggered the launch is communicated  
to the process.  Seems like a reasonable enhancement request, but the  
files may be modified after the process is launched and it's the  
agent's responsibility to watch for that.

> Second, hopefully easier question: Do the terms "launch services" and
> "launchd" refer to the same thing?

LaunchServices refers to the high level framework for opening  
applications and documents with applications.  On Leopard,  
LaunchServices uses launchd to create new processes.

- Kevin


More information about the launchd-dev mailing list