3 ms·
I'd be interested to know how to do that. Go's Chdir() calls SYS_CHDIR on Darwin, and Posix requires that chdir affects the whole process. In Linux you can uns
by bboreham 9y ago
I'd be interested to know how to do that. Go's Chdir() calls SYS_CHDIR on Darwin, and Posix requires that chdir affects the whole process.
In Linux you can unset CLONE_FS when creating a thread, but the Go runtime does not do this.
I note the Windows docs[1] say "Multithreaded applications and shared library code should not use the SetCurrentDirectory function" (which Go's Chdir() calls)
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365530(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
- the_mitsuhiko 9y agoSYS___pthread_chdir exists on mac os.