sysconf(3C)
NAME
sysconf − get configurable system variables
SYNOPSIS
#include <unistd.h>
long sysconf(int name);
DESCRIPTION
The sysconf() function provides a method for an application to determine the current value of a configurable system limit or option (variable).
The name argument represents the system variable to be queried. The following table lists the minimal set of system variables from <limits.h> and <unistd.h> that can be returned by sysconf(), and the symbolic constants, defined in <unistd.h> that are the corresponding values used for name.
NameReturn ValueMeaning
_SC_ARG_MAXARG_MAXMax combined size of argv[]
and envp[]
_SC_CHILD_MAXCHILD_MAXMax processes allowed to any UID
_SC_CLK_TCKCLK_TCKTicks per second (clock_t)
_SC_NGROUPS_MAXNGROUPS_MAX Max simultaneous groups one
process may belong to
_SC_OPEN_MAXOPEN_MAXMax open files per process
_SC_PASS_MAXPASS_MAX
_SC_PAGESIZEPAGESIZESystem memory page size
_SC_JOB_CONTROL_POSIX_JOB_CONTROL Job control supported
(boolean)
_SC_SAVED_IDS_POSIX_SAVED_IDSSaved ids (seteuid())
supported (boolean)
_SC_VERSION_POSIX_VERSIONVersion of the POSIX.1 standard
supported
_SC_XOPEN_VERSION_XOPEN_VERSION
_SC_LOGNAME_MAXLOGNAME_MAX
The value of CLK_TCK may be variable and it should not be assumed that CLK_TCK is a compile-time constant.
RETURN VALUES
If name is an invalid value, sysconf() will return −1 and set errno to indicate the error. If sysconf() fails due to a value of name that is not defined on the system, the function will return a value of −1 without changing the value of errno.
SEE ALSO
NOTES
A call to setrlimit() may cause the value of OPEN_MAX to change.
SunOS 5.1 — Last change: 12 Aug 1990