value of OPEN_MAX

43 Views Asked by At

What is the value of OPEN_MAX on various platforms?

I know that the dynamic limit for the number of open file descriptors can be retrieved through sysconf (_SC_OPEN_MAX), getdtablesize (), or getrlimit (NOFILE, ...). Nonetheless, I want to know how large I can choose file descriptors in the simplest possible case.

When I look at <limits.h> on my system, I only ever get the value for that system.

1

There are 1 best solutions below

0
Bruno Haible On

OPEN_MAX is defined in <limits.h>:

Operating system Value
AIX ≥ 5.2 65534
AIX < 5.2 32767
macOS 10240
Interix 1024
Linux, Solaris, Cygwin 256
Minix 255
BeOS, Haiku, NetBSD 128
FreeBSD, OpenBSD, OSF/1 64
HP-UX 60
native Windows 32
IRIX 20