Where is OPEN_MAX defined for Linux systems?

前端 未结 3 746
孤城傲影
孤城傲影 2021-02-09 08:33

OPEN_MAX is the constant that defines the maximum number of open files allowed for a single program.

According to Beginning Linux Programming 4th

3条回答
  •  粉色の甜心
    2021-02-09 09:04

    I suggest to use the magic of grep to find this constant on /usr/include:

    grep -rn --col OPEN_MAX /usr/include
    
    ...
    ...
    /usr/include/stdio.h:159:   FOPEN_MAX   Minimum number of files that can be open at once.
    ...
    ...
    

    Hope it helps you

提交回复
热议问题