Catch Errno::ENFILE too.

When system file descriptor table is full, errno is set to
ENFILE instead of EMFILE.  They are similar but different.
This commit is contained in:
Tomoyuki Sahara
2013-12-13 15:49:32 +09:00
parent 87d878292d
commit 8cee36b1b5
+1 -1
View File
@@ -16,7 +16,7 @@ class File < IO
@path = fd_or_path
begin
fd = IO.sysopen(@path, mode, perm)
rescue Errno::EMFILE
rescue Errno::EMFILE, Errno::ENFILE
GC.start
fd = IO.sysopen(@path, mode, perm)
end