I know what a working directory (wd) is and it is intended (for writing software at least).
What I don't understand is ownership of wd. In addition, I want to understand how the answer may vary depending on operating systems, so any clarification on unusual behavior on a particular OS would be appreciated.
So, firstly, where does wd appear? Is it inside the process, and all threads created by this process have the same wd? If wd is changed by thread "A", it instantly displays in thread "B", which was also spawned by thread "Process?"
And secondly, how is wd originally defined? If you run something from the command line, it's pretty easy to see, but what about a process that spawns a few more processes?
Note: Process Explorer shows each wd process in it. Properties window.
source
share