WorkingDirectory <string> in a launchd.plist is an optional key used to specify a directory to chdir(2) to before running the job. If this key is not present, then the root
/ directory is used.
I verified this by running a shell script as both a Launch Agent and a Launch Daemon that, when run, appended a directory listing to a text file. In all cases, without the
WorkingDirectory <string> key, the output was the root
/ directory of the startup disk.
Depending on whether or not it was run as root or the current user the output as root also contained the hidden directories even though that was not explicitly set to output by the script.
As a side note, the
PATH passed to the shell script when run as both a Launch Agent and Launch Daemon was:
Note that this was tested under OS X 10.8.5.