From: Charles Oliver Nutter Date: 2008-09-12T03:07:34+09:00 Subject: Re: FileUtils.chdir thread safety Michal Suchanek wrote: > If you allow global chdir that's technically chnging the cwd for other threads. > > I had a vague idea that there could be an option that controls if cwd > should be emulated ( saved/restored on thread switch or restored for > syscalls that need it) or the global cwd should be used. Changing it on thread switch would probably be necessary for MRI, but not really necessary or possible on JRuby since threads run in parallel. But by the same token, I'm not certain any JRuby support for per-thread CWD would be able to handle calls out to 'ls' and friends, since even the best fakery we can do to make File APIs have a per-thread CWD would still not affect the system calls used to launch external processes... - Charlie