up | Inhaltsverzeichniss | Kommentar

Manual page for SYSCONF(2V)

sysconf - query system related limits, values, options

SYNOPSIS

#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 value does not change during the lifetime of the calling process.

The convention used throughout sections 2 and 3 is that {LIMIT} means that LIMIT is something that can change from system to system and applications that want accurate values need to call sysconf(). These values are things that have been historically available in header files such as <sys/param.h>.

The following lists the conceptual name and meaning of each variable.

Name                   Meaning
------------------------------------------------------------------
{ARG_MAX}              Max combined size of argv[] & envp[].
{CHILD_MAX}            Max processes allowed to any UID.
{CLK_TCK}              Ticks per second (clock_t).
{NGROUPS_MAX}          Max simultaneous groups one may belong to.
{OPEN_MAX}             Max open files per process.
{_POSIX_JOB_CONTROL}   Job control supported (boolean).
{_POSIX_SAVED_IDS}     Saved ids (seteuid()) supported (boolean).
{_POSIX_VERSION}       Version of the POSIX.1 standard supported.

The following table lists the conceptual name of each variable and the flag passed to sysconf() to retrieve the value of each variable.

Name                   Sysconf flag
---------------------------------------
{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 VALUES

sysconf() returns the current variable value on success. On failure, it returns -1 and sets errno to indicate the error.

ERRORS

EINVAL
The value of name is invalid.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97