sysconf(3) — Subroutines
OSF
NAME
sysconf − Gets configurable system variables
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <unistd.h> long sysconf (
int name );
PARAMETERS
nameSpecifies the system variable to be queried.
DESCRIPTION
The sysconf() function provides a method for determining the current value of a configurable system limit or whether optional features are supported.
The set of system variables from the limits.h or unistd.h include file that are returned by the sysconf() function, and the symbolic constants, defined in the unistd.h header file that correspond to the name parameter, are as follows:
| Variable | Value of name | |
| ARG_MAX | _SC_ARG_MAX | |
| CHILD_MAX | _SC_CHILD_MAX | |
| clock ticks/second | _C_CLK_TCK | |
| NGROUPS_MAX | _SC_NGROUPS_MAX | |
| OPEN_MAX | _SC_OPEN_MAX | |
| _POSIX_JOB_CONTROL | _SC_JOB_CONTROL | |
| _POSIX_SAVED_IDS | _SC_SAVED_IDS | |
| _POSIX_VERSION | _SC_VERSION | |
| PASS_MAX | _SC_PASS_MAX | |
| _XOPEN_VERSION | _SC_XOPEN_VERSION | |
| ATEXIT_MAX | _SC_ATEXIT_MAX | |
| PAGE_SIZE | _SC_PAGE_SIZE | |
| AES_OS_VERSION | _SC_AES_OS_VERSION |
NOTES
AES Support Level:
Full use
RETURN VALUES
If the name parameter is an invalid value, the sysconf() function returns −1 and sets errno to indicate the error. If the variable corresponding to name is undefined, the sysconf() function returns −1 without changing the value of errno.
If the name parameter is _SC_JOB_CONTROL or _SC_SAVED_IDS, the sysconf() function returns a nonnegative value.
Otherwise, the sysconf() function returns the current variable value on the system. The value will not change during the lifetime of the calling process.
ERRORS
If the sysconf() function fails, errno may be set to the following value:
[EINVAL]The value of the name parameter is invalid.
RELATED INFORMATION
Functions: pathconf(3)