Bruno Haible wrote:
If I have a replacement getdtablesize() return 65535, that could cause
programs to assume that they could actually open that many descriptors.
This is only a theoretical risk. I know of no programs that are that
aggressive.
Although GNU 'sort' does something like that, it has code to deal with later
'open' failures due to EMFILE and/or ENFILE. Any program that allocates file
descriptors that aggressively really needs to deal with 'open' failures that can
occur regardless of what getdtablesize returns.