I'm aware what a working directory (wd) is and it's purpose (for writing software at least).
What I don't understand is the ownership of the wd. Furthermore, I want to understand how the answer may vary between operating systems so any clarification on unusual behaviour on a particular OS would be appreciated.
So firstly, where does the wd manifest itself? Is it within a process, and all threads created by that process share the same wd? If the wd gets modified by thread 'A', is the change instantly visible to thread 'B' which was also spawned by thread 'A's process?
And secondly, how is the wd initially defined? If you start something from a command prompt its fairly easy to see how, but what about a process which spawns several more processes?
Note: Process Explorer shows each process' wd in it's Properties window.