os.sysconf('SC_OPEN_MAX') gets you the value of the maximum allowed files. The
limits approach was to limit this change to the processes the user starts.
Another possibilty would be to keep the soft limit, but increase the hard limit,
so this value can be raised by the user by resource.setrlimit(...)
IMO it doesn't make sense if the interpreter tracks a record of all open files,
the number of files opened by extension modules and external libraries is
unknown to the interpreter and such tracking would be unreliable.
os.sysconf( 'SC_OPEN_ MAX') gets you the value of the maximum allowed files. The setrlimit( ...)
limits approach was to limit this change to the processes the user starts.
Another possibilty would be to keep the soft limit, but increase the hard limit,
so this value can be raised by the user by resource.
IMO it doesn't make sense if the interpreter tracks a record of all open files,
the number of files opened by extension modules and external libraries is
unknown to the interpreter and such tracking would be unreliable.