On 6/28/2017 3:56 PM, Bruno Haible wrote:
According to that link, a system is not required to fail a request for a file descriptor to be created higher than RLIMIT_NOFILE.John E. Malmberg wrote:OpenVMS has the function. Configure detects it exists, but the test for it working is failing. ... The OpenVMS getdtablesize() is returning the maximum number of open files that a process can have.It is not returning the highest file descriptor + 1 that can be used in the system. That number is 65535 for OpenVMS Alpha and Integrity. That is why it is failing the configure test.There are two possibilities: (a) change the configure test so that is duplicates fd 0 to 1, 2, 3, ..., getdtablesize() and see if that fails. (b) special-case OpenVMS. I'm not in favour of (a) because it might allocate so many file descriptors that the kernel gets problems. So (b). Just add a few lines case "$host_os" in vms*) ... at the appropriate place. Can you propose such a patch? Please try to approximate the wording of POSIX [1] as closely as possible. Bruno [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html
Attached is a patch for the test to pass on OpenVMS. Regards, -John
0001-getdtablesize.m4-Fix-for-OpenVMS.patch.gz
Description: GNU Zip compressed data