Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno::EACCES when multiple files are open simultaneously #2415

Open
jbeyer05 opened this issue Jan 3, 2015 · 0 comments
Open

Errno::EACCES when multiple files are open simultaneously #2415

jbeyer05 opened this issue Jan 3, 2015 · 0 comments

Comments

@jbeyer05
Copy link

@jbeyer05 jbeyer05 commented Jan 3, 2015

This is a re-post of a bug listed in the CodeHaus bug tracker (JRUBY-6022) that still affects 1.7.18.
When a large number of files are open without closing the handles, the user receives an EACCES exception. This is not the case with cruby. Code used to demonstrate difference between jruby and cruby below.

[02:22 AM] jbeyer@cervelo :: ~ $ cat test.rb
Dir.glob( '/cervelo/Warehouse/*/*' ) do |f_name|
  f = File.open( f_name )
end
[02:22 AM] jbeyer@cervelo :: ~ $ rvm use jruby-1.7.18
Using /usr/local/rvm/gems/jruby-1.7.18
[02:22 AM] jbeyer@cervelo :: ~ $ ruby test.rb
Errno::EACCES: Permission denied - /cervelo/Warehouse/MSW/07-10-02.csv
  initialize at org/jruby/RubyFile.java:362
        open at org/jruby/RubyIO.java:1177
      (root) at test.rb:2
        glob at org/jruby/RubyDir.java:242
      (root) at test.rb:1
[02:22 AM] jbeyer@cervelo :: ~ $ rvm use ruby-2.1.5
Using /usr/local/rvm/gems/ruby-2.1.5
[02:22 AM] jbeyer@cervelo :: ~ $ ruby test.rb
[02:22 AM] jbeyer@cervelo :: ~ $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant