mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user