*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> sysconf (3)              
Title
Content
Arch
Section
 

SYSCONF(3)

Contents


NAME    [Toc]    [Back]

     sysconf - get configurable system variables

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     long
     sysconf(int name);

DESCRIPTION    [Toc]    [Back]

     This  interface  is  defined   by   IEEE   Std   1003.1-1988
(``POSIX'').  A far
     more complete interface is available using sysctl(3).

     The sysconf() function provides a method for applications to
determine
     the current value of a configurable system limit  or  option
variable.  The
     name  argument  specifies the system variable to be queried.
Symbolic constants
 for each name value are found  in  the  include  file
<unistd.h>.

     The available values are as follows:

     _SC_ARG_MAX
             The maximum bytes of arguments to exec(3) (including
the environment).


     _SC_CHILD_MAX
             The maximum number of simultaneous processes per user ID.

     _SC_CLK_TCK
             The number of clock ticks per second.

     _SC_NGROUPS_MAX
             The maximum number of supplemental groups.

     _SC_OPEN_MAX
             The maximum number of open files per user ID.

     _SC_STREAM_MAX
             The minimum maximum number of streams that a process
may have
             open at any one time.

     _SC_TZNAME_MAX
             The minimum maximum number of  types  supported  for
the name of a
             timezone.

     _SC_JOB_CONTROL
             Returns  1  if job control is available on this system, otherwise
             -1.

     _SC_SAVED_IDS
             Returns 1 if saved set-group-ID and saved  set-userID is available,
 otherwise -1.

     _SC_VERSION
             The  version  of  ISO/IEC  9945  (POSIX 1003.1) with
which the system
             attempts to comply.

     _SC_BC_BASE_MAX
             The maximum ibase/obase values in the bc(1) utility.

     _SC_BC_DIM_MAX
             The maximum array size in the bc(1) utility.

     _SC_BC_SCALE_MAX
             The maximum scale value in the bc(1) utility.

     _SC_BC_STRING_MAX
             The maximum string length in the bc(1) utility.

     _SC_COLL_WEIGHTS_MAX
             The  maximum  number of weights that can be assigned
to any entry
             of the LC_COLLATE order keyword in the locale  definition file.

     _SC_EXPR_NEST_MAX
             The maximum number of expressions that can be nested
within
             parenthesis by the expr(1) utility.

     _SC_LINE_MAX
             The maximum length in  bytes  of  a  text-processing
utility's input
             line.

     _SC_RE_DUP_MAX
             The maximum number of repeated occurrences of a regular expression
 permitted when using interval notation.

     _SC_2_VERSION
             The version of POSIX 1003.2 with  which  the  system
attempts to
             comply.

     _SC_2_C_BIND
             Return  1 if the system's C-language development facilities support
 the C-Language Bindings Option, otherwise -1.

     _SC_2_C_DEV
             Return 1 if the system supports the  C-Language  Development Utilities
 Option, otherwise -1.

     _SC_2_CHAR_TERM
             Return  1 if the system supports at least one terminal type capable
 of all operations  described  in  POSIX  1003.2,
otherwise -1.

     _SC_2_FORT_DEV
             Return 1 if the system supports the FORTRAN Development Utilities
             Option, otherwise -1.

     _SC_2_FORT_RUN
             Return 1 if the system supports the FORTRAN  Runtime
Utilities Option,
 otherwise -1.

     _SC_2_LOCALEDEF
             Return  1 if the system supports the creation of locales, otherwise
 -1.

     _SC_2_SW_DEV
             Return 1 if the system supports the Software  Development Utilities
 Option, otherwise -1.

     _SC_2_UPE
             Return 1 if the system supports the User Portability
Utilities
             Option, otherwise -1.

     _SC_PAGESIZE
             The size of a system page in bytes.

     _SC_FSYNC
             Return 1 if the system supports the File  Synchronisation Option,
             otherwise -1.

     _SC_XOPEN_SHM
             Return  1  if  the system supports the Shared Memory
Option, otherwise
 -1.

     _SC_SEM_NSEMS_MAX
             The maximum number of semaphores in the system or -1
if the system
 does not support the Semaphores Option.

     _SC_SEM_VALUE_MAX
             The maximum value a semaphores may have or -1 if the
system does
             not support the Semaphores Option.

RETURN VALUES    [Toc]    [Back]

     If the call to sysconf() is not successful, -1  is  returned
and errno is
     set appropriately.  Otherwise, if the variable is associated
with functionality
 that is not supported, -1 is returned and errno is
not modified.
  Otherwise, the current variable value is returned.

ERRORS    [Toc]    [Back]

     The sysconf() function may fail and set errno for any of the
errors specified
 for the library functions sysctl(3).  In addition, the
following
     error may be reported:

     [EINVAL]      The value of the name argument is invalid.

SEE ALSO    [Toc]    [Back]

      
      
     pathconf(2), sysctl(3)

STANDARDS    [Toc]    [Back]

     The  sysconf()  function  conforms  to  IEEE Std 1003.1-1988
(``POSIX'').

HISTORY    [Toc]    [Back]

     The sysconf() function first appeared in 4.4BSD.

BUGS    [Toc]    [Back]

     The value for _SC_STREAM_MAX is a minimum maximum,  and  required to be the
     same  as  ANSI  C's  FOPEN_MAX,  so  the returned value is a
ridiculously small
     and misleading number.

OpenBSD     3.6                          April      19,      1994
[ Back ]
 Similar pages
Name OS Title
pxfsysconf IRIX Retrieves the value of configurable system variables
sysconf IRIX get configurable system variables (POSIX)
confstr IRIX get configurable variables
pathconf FreeBSD get configurable pathname variables
fpathconf HP-UX get configurable path name variables
pathconf NetBSD get configurable pathname variables
pathconf HP-UX get configurable path name variables
fpathconf FreeBSD get configurable pathname variables
pathconf OpenBSD get configurable pathname variables
fpathconf NetBSD get configurable pathname variables
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service