From: sera@... Date: 2005-02-05T06:15:18+09:00 Subject: Too many open files - getcwd (Errno::EMFILE) So I'm working on my wonky FileSystem library, and right now it makes a lot of calls to Dir.getwd. I find that if I use it enough -- right now I'm integrating it into my main web site's unit tests, all 500 of them -- then I get a traceback like this: /usr/local/lib/ruby/site_ruby/1.8/filesystem.rb:251:in `getwd'(TestArtbaseSubmissionPhaseChange): Too many open files - getcwd (Errno::EMFILE) from /usr/local/lib/ruby/site_ruby/1.8/filesystem.rb:251:in `absolute' from /usr/local/lib/ruby/site_ruby/1.8/filesystem.rb:154:in `fill_path' from ./test/ts_domain.rb:43:in `setup' from /usr/bin/runtest.rb:23:in `run' from /usr/bin/runtest.rb:33 The ruby-talk archives lead me to believe that Errno::EMFILE is thrown when you have too many open files lying around, hence the error, obviously. This is easy enough for me to work around, but I'm curious: Why would Dir.getwd have this problem? Is it opening some files for some reason?