When a program accesses files, uses system() , etc., how and where is the current working directory of this program physically known / stored? Since the programโs working directory is logically similar to a global variable, it should ideally be thread-local, especially in languages โโsuch as D, where global variables are by default streaming. Is it possible to make the current working directory a software thread-local?
Note. If you are not particularly familiar with D, even an agnostic answer may be helpful.
source share