Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sysconf(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 sysconf(S)                     6 January 1993                     sysconf(S)


 Name

    sysconf - get configurable system variables

 Syntax


    cc ... -lc


    #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.  In the
    table that follows, the values in the left column are defined in
    <limits.h>, except for CLKTCK, which is defined in <time.h>. The values
    in the right column are defined in <unistd.h>. The information in the
    right column comprise the possible values for the name argument.

    _________________________________________________________________________
    Variable                      name Value
    _________________________________________________________________________
    {ARGMAX}                     {SCARGMAX}
    {CHILDMAX}                   {SCCHILDMAX}
    {CLKTCK}                     {SCCLKTCK}
    {NGROUPSMAX}                 {SCNGROUPSMAX}
    {OPENMAX}                    {SCOPENMAX}
    {PASSMAX}                    {SCPASSMAX}
    {POSIXJOBCONTROL}          {SCJOBCONTROL}
    {POSIXSAVEDIDS}            {SCSAVEDIDS}
    {POSIXVERSION}              {SCVERSION}


    The value returned by sysconf for SCCLKTCK is the same as CLKTCK.

 Return value

    If name is an invalid value, sysconf returns a -1.  If the variable cor-
    responding to name is not defined on the system, sysconf returns -1
    without changing the value of errno.

    Otherwise, sysconf 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 <time.h> or <unistd.h>.  The value does not change dur-
    ing the lifetime of the calling process.


 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.


 Notes

    PASS_MAX and _SC_PASS_MAX are XPG3 extensions over POSIX.

 Standards conformance

    sysconf is conformant with:
    IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C
    Language] (ISO/IEC 9945-1);
    and NIST FIPS 151-1.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026