'\"macro stdmacro
.if n .pH g3c.sysconf @(#)sysconf	40.13 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} sysconf 3C "C Programming Language Utilities" "\&"
.if \nX=1 .ds x} sysconf 3C "C Programming Language Utilities"
.if \nX=2 .ds x} sysconf 3C "" "\&"
.if \nX=3 .ds x} sysconf "" "" "\&"
.TH \*(x}
.SH NAME
\f4sysconf\f1 \- get configurable system variables
.SH SYNOPSIS
.nf
.ft 4
#include <unistd.h>
.sp .5
long sysconf(int name);
.ft 1
.fi
.SH DESCRIPTION
The \f4sysconf\f1 function provides a method for the application
to determine the current value of a configurable system limit or
option (variable).
.P
The \f2name\f1 argument
represents the system variable to be queried.
The following table lists the minimal set of system variables from
\f4<limits.h>\f1 and \f4<unistd.h>\f1
that can be returned by
\f4sysconf\f1, and the symbolic constants, defined in \f4<unistd.h>\f1
that are the corresponding values used for \f2name\f1.
.TS
center,box;
c c
_	_
lfCW lfCW.
.sp .5
NAME	RETURN VALUE
.sp .5
_SC_ARG_MAX	ARG_MAX
_SC_CHILD_MAX	CHILD_MAX
_SC_CLK_TCK	CLK_TCK
_SC_NGROUPS_MAX	NGROUPS_MAX
_SC_OPEN_MAX	OPEN_MAX
_SC_PASS_MAX	PASS_MAX
_SC_PAGESIZE	PAGESIZE
_SC_JOB_CONTROL	_POSIX_JOB_CONTROL
_SC_SAVED_IDS	_POSIX_SAVED_IDS
_SC_VERSION	_POSIX_VERSION
_SC_XOPEN_VERSION	_XOPEN_VERSION
_SC_LOGNAME_MAX	LOGNAME_MAX
.sp .5
.TE
.P
The value of \f4CLK_TCK\f1 may be variable and it should not be assumed
that \f4CLK_TCK\f1 is a compile-time constant.
The value of \f4CLK_TCK\f1 is the same as the value of
\f4sysconf(_SC_CLK_TCK)\f1.
.SH "SEE ALSO"
\f4fpathconf\fP(3C).
.SH DIAGNOSTICS
If \f2name\f1 is an invalid value, \f4\%sysconf\f1
will return \f4\-1\f1 and set \f4errno\f1 to indicate the error.
If \f4\%sysconf\f1 fails due to a value of
\f2name\f1 that is not defined on the system, the function will return
a value of \f4\-1\f1 without changing the value of \f4errno\f1.
.SH NOTES
A call to \f4setrlimit\f1 may cause the
value of \f4OPEN_MAX\f1 to change. 
