SYSCONF(S) UNIX System V SYSCONF(S)
Name
sysconf - get configurable system variables
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 ( variable).
The name argument represents the system variable to be
queried. The implementation shall support all of the
variables listed in the following table and may support
others. The variables in the following table come from
<limits.h> or <unistd.h> (or <time.h>) from CLK_TCK, and the
symbolic constants, defined in <unistd.h>, that are the
corresponding values used for name.
The value of CLK_TCK is evaluated at run-time. The value
returned by sysconf() for _SC_CLK_TCK is the same as that
returned by CLK_TCK.
Return Value
If name is an invalid value, sysconf() returns a -1. If the
variable corresponding to name is not defined on the system,
sysconf() returns -1 without changing the value of errno.
Otherwise, the sysconf() function returns the current
variable value on the system. The value returned is not
more restrictive than the corresponding value described to
the application when it was compiled with the
implementation's <limits.h> or <unistd.h>. The value does
not change during the lifetime of the calling process.
Variable name 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}
Diagnostics
If any of the following conditions occur, the sysconf()
function returns -1 and sets errno to the corresponding
value:
[EINVAL] The value of the name argument is invalid.
Standards Conformance
sysconf is conformant with:
IEEE POSIX Std 1003.1-1988 with C Standard Language-
Dependent System Support;
and NIST FIPS 151-1.
(printed 6/20/89)