From: Mr_Tibs Date: 2008-09-08T17:43:50+09:00 Subject: FileUtils.chdir thread safety Hi, I'm getting this error: "warning: conflicting chdir during another chdir block" when running the following code: require 'fileutils' def blah(d) FileUtils.cd d do puts FileUtils.pwd sleep 2 puts FileUtils.pwd end end threads = [] threads << Thread.new { blah('/home/motoct/dev/test1') } threads << Thread.new { blah('/home/motoct/dev/test2') } threads.each { |t| t.join } The second pwd of the first thread prints the current script directory (where this code is located), so it is not just a warning! I guess FileUtils.chdir is not thread safe. Is there any way you can make it thread safe? Thanks, Tiberiu