sysconf(3) Library Functions Manual sysconf(3) sysconf - Standard C library (libc, -lc) #include long sysconf(int name); POSIX . / . sysconf(). , , , fpathconf(3) pathconf(3). confstr(3). , , . . For options, typically, there is a constant _POSIX_FOO that may be defined in . If it is undefined, one should ask at run time. If it is defined to -1, then the option is not supported. If it is defined to 0, then relevant functions and headers exist, but one has to ask at run time what degree of support is available. If it is defined to a value other than -1 or 0, then the option is supported. Usually the value (such as 200112L) indicates the year and month of the POSIX revision describing the option. glibc uses the value 1 to indicate support as long as the POSIX revision has not been published yet. The sysconf() argument will be _SC_FOO. For a list of options, see posixoptions(7). , , _FOO, , _POSIX_FOO, . , . , . , , sysconf(). sysconf() _SC_FOO. POSIX.1 , sysconf(), , . POSIX.1 . ARG_MAX - _SC_ARG_MAX exec(3). _POSIX_ARG_MAX (4096). CHILD_MAX - _SC_CHILD_MAX ID. _POSIX_CHILD_MAX (25). HOST_NAME_MAX - _SC_HOST_NAME_MAX ( null-), gethostname(2). _POSIX_HOST_NAME_MAX (255). LOGIN_NAME_MAX - _SC_LOGIN_NAME_MAX ( null-). _POSIX_LOGIN_NAME_MAX (9). NGROUPS_MAX - _SC_NGROUPS_MAX . - _SC_CLK_TCK . . CLK_TCK (: CLOCKS_PER_SEC , 1000000). OPEN_MAX - _SC_OPEN_MAX , . _POSIX_OPEN_MAX (20). PAGESIZE - _SC_PAGESIZE . 1. PAGE_SIZE - _SC_PAGE_SIZE PAGESIZE/_SC_PAGESIZE (PAGESIZE PAGE_SIZE POSIX). RE_DUP_MAX - _SC_RE_DUP_MAX BRE, regexec(3) regcomp(3). _POSIX2_RE_DUP_MAX (255). STREAM_MAX - _SC_STREAM_MAX , . , , C FOPEN_MAX. _POSIX_STREAM_MAX (8). SYMLOOP_MAX - _SC_SYMLOOP_MAX , , ELOOP. _POSIX_SYMLOOP_MAX (8). TTY_NAME_MAX - _SC_TTY_NAME_MAX , null. _POSIX_TTY_NAME_MAX (9). TZNAME_MAX - _SC_TZNAME_MAX . _POSIX_TZNAME_MAX (6). _POSIX_VERSION - _SC_VERSION , POSIX.1, YYYYMML; 199009L 1990 . POSIX.2 POSIX.2, . BC_BASE_MAX - _SC_BC_BASE_MAX obase, bc(1). BC_DIM_MAX - _SC_BC_DIM_MAX , bc(1). BC_SCALE_MAX - _SC_BC_SCALE_MAX scale, bc(1). BC_STRING_MAX - _SC_BC_STRING_MAX , bc(1). COLL_WEIGHTS_MAX - _SC_COLL_WEIGHTS_MAX indicates the maximum numbers of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file. EXPR_NEST_MAX - _SC_EXPR_NEST_MAX , expr(1). LINE_MAX - _SC_LINE_MAX , . . RE_DUP_MAX - _SC_RE_DUP_MAX The maximum number of repeated occurrences of a regular expression when the interval notation \{m,n\} is used. POSIX2_VERSION - _SC_2_VERSION POSIX.2 YYYYMML. POSIX2_C_DEV - _SC_2_C_DEV , POSIX.2. POSIX2_FORT_DEV - _SC_2_FORT_DEV , FORTRAN POSIX.2. POSIX2_FORT_RUN - _SC_2_FORT_RUN , FORTRAN POSIX.2. _POSIX2_LOCALEDEF - _SC_2_LOCALEDEF indicates whether the POSIX.2 creation of locales via localedef(1) is supported. POSIX2_SW_DEV - _SC_2_SW_DEV , POSIX.2. , . - _SC_PHYS_PAGES . , _SC_PAGESIZE. - _SC_AVPHYS_PAGES . - _SC_NPROCESSORS_CONF . get_nprocs_conf(3). - _SC_NPROCESSORS_ONLN () . get_nprocs_conf(3). sysconf() : o -1, errno (, EINVAL, , name ). o name , -1 errno ( , errno , , errno , -1). o name , , -1, . o . , . EINVAL name. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |sysconf() | | MT-Safe env | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. POSIX.1-2001. ARG_MAX, exec(3) . ; . bc(1), expr(1), getconf(1), locale(1), confstr(3), fpathconf(3), pathconf(3), posixoptions(7) () Alexander Golubev , Azamat Hackimov , Hotellook, Nikita , Spiros Georgaras , Vladislav , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux man-pages 6.12 23 2024 . sysconf(3)