sysconf(3)
NAME
sysconf − get configurable system variables (POSIX)
SYNTAX
#include <unistd.h>
long sysconf(name);
int name;
DESCRIPTION
The sysconf() function provides a method for the application to determine the current value of a configurable system limit or option.
The name argument represents the system variable to be queried. The following table lists the system variables which may be queried and the corresponding value for the name argument. The values for the name argument are defined in the <unistd.h> header file.
Variablename Value
ARG_MAX_SC_ARG_MAX
CHILD_MAX_SC_CHILD_MAX
CLK_TCK_SC_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
RETURN VALUE
Upon successful completion, the sysconf() function returns the current variable value on the system.
If name is an invalid value, sysconf() returns −1 and errno is set to indicate the reason. If the variable corresponding to name is not defined on the system, sysconf() returns −1 without changing the value of errno.
DIAGNOSTICS
The sysconf() function fails if the following occurs:
[EINVAL] The value of the name argument is invalid.
SEE ALSO
<unistd.h>
Subroutines