Commit 8cee36b1 authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

Catch Errno::ENFILE too.

When system file descriptor table is full, errno is set to
ENFILE instead of EMFILE.  They are similar but different.
parent 87d87829
...@@ -16,7 +16,7 @@ class File < IO ...@@ -16,7 +16,7 @@ class File < IO
@path = fd_or_path @path = fd_or_path
begin begin
fd = IO.sysopen(@path, mode, perm) fd = IO.sysopen(@path, mode, perm)
rescue Errno::EMFILE rescue Errno::EMFILE, Errno::ENFILE
GC.start GC.start
fd = IO.sysopen(@path, mode, perm) fd = IO.sysopen(@path, mode, perm)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment