392 lines
12 KiB
Plaintext
392 lines
12 KiB
Plaintext
'\"! mmdoc
|
|
'\"macro stdmacro
|
|
.if n .pH g3c.sysconf @(#)sysconf 41.3 of 5/22/91
|
|
.\" Copyright 1991 UNIX System Laboratories, Inc.
|
|
.\" Copyright 1989, 1990 AT&T
|
|
.nr X
|
|
.if \nX=0 .ds x} sysconf 3C "C Development Set" "\&"
|
|
.if \nX=1 .ds x} sysconf 3C "C Development Set"
|
|
.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 an application
|
|
to determine the current value of a configurable system limit or
|
|
option (variable). By using this function, applications can be more
|
|
portable across different operating systems.
|
|
.P
|
|
The \f2name\f1 argument
|
|
represents the system variable to be queried.
|
|
Some of the limits have a minimal value defined by POSIX or XPG4 which may
|
|
have a higher value under IRIX. Some limits are fixed in the system
|
|
and some may be altered by the system administrator (see
|
|
.BR systune (1M)
|
|
for information on how to change system limits). In general, the
|
|
values returned by
|
|
.B sysconf
|
|
will be constant for the duration of a process.
|
|
In various manual pages, limits are specified within braces
|
|
(e.g. \f2{ARG_MAX}\fP.
|
|
The limit name, prepended with a \f4_SC_\fP is the name to be used
|
|
with \f4sysconf\fP.
|
|
For options such as \f2{POSIX2_VERSION}\fP, the name to be used as
|
|
the argument to \f2name\fP is the option name, minus \f4POSIX\fP and
|
|
\f4_SC_\fP prepended (\f4_SC_2_VERSION\fP).
|
|
The following lists the set of system variables from \f4<unistd.h>\f1
|
|
that can be returned by \f4sysconf\f1.
|
|
.sp .5
|
|
.TP 2i
|
|
NAME
|
|
MEANING
|
|
.sp .5
|
|
.TP 2i
|
|
\f4_SC_ARG_MAX\f1
|
|
Maximum length of arguments for the exec functions, in bytes, including environment data.
|
|
.TP
|
|
\f4_SC_ATEXIT_MAX\f1
|
|
Maximum number of functions that may be registered with \f4atexit\f1().
|
|
This value is always set at \f437\f1 in Irix. This value is currently
|
|
not able to be changed in Irix.
|
|
.TP
|
|
\f4_SC_CHILD_MAX\f1
|
|
Maximum number of simultaneous processes per real user ID.
|
|
.TP
|
|
\f4_SC_IOV_MAX\f1
|
|
Maximum number of \f4iovec\f1 structures that one process has
|
|
available for use with \f4readv\f1() or \f4writev\f1(). This
|
|
value is currently \f4512\f1 or higher in Irix.
|
|
This value is currently not able to be changed in Irix.
|
|
.TP
|
|
\f4_SC_CLK_TCK\f1
|
|
Clock ticks per second.
|
|
.TP
|
|
\f4_SC_NACLS_MAX\f1
|
|
Always 0 on Irix.
|
|
.TP
|
|
\f4_SC_NGROUPS_MAX\f1
|
|
Maximum number of simultaneous supplementary group IDs per process.
|
|
.TP
|
|
\f4_SC_OPEN_MAX\f1
|
|
Maximum number of files that one process can have open at any given time.
|
|
.TP
|
|
\f4_SC_PASS_MAX\f1
|
|
Maximum number of characters in a password.
|
|
.TP
|
|
\f4_SC_PAGESIZE\f1
|
|
The memory page size of the system expressed in bytes.
|
|
This is the fundamental unit of memory management of the operating system.
|
|
.TP
|
|
\f4_SC_JOB_CONTROL\f1
|
|
Always 1 on Irix which supports job control.
|
|
.TP
|
|
\f4_SC_SAVED_IDS\f1
|
|
Always 1 on Irix which supports this feature of \f4setuid\fP(2).
|
|
.TP
|
|
\f4_SC_VERSION\f1
|
|
The version of POSIX currently supported.
|
|
.TP
|
|
\f4_SC_XOPEN_VERSION\f1
|
|
The version of X/Open currently supported.
|
|
.TP
|
|
\f4_SC_LOGNAME_MAX\f1
|
|
Maximum number of characters in a login name.
|
|
.TP
|
|
\f4_SC_NPROC_CONF\f1
|
|
Total number of processors configured in the machine.
|
|
.TP
|
|
\f4_SC_NPROC_ONLN\f1
|
|
Total number of processors currently online.
|
|
.TP
|
|
\f4_SC_STREAM_MAX\f1
|
|
The number streams that one process can have open at one time.
|
|
.TP
|
|
\f4_SC_TZNAME_MAX\f1
|
|
The maximum number of bytes supported for the name of a time zone.
|
|
.TP
|
|
\f4_SC_RTSIG_MAX\f1
|
|
The number of realtime signal values available.
|
|
.TP
|
|
\f4_SC_SIGQUEUE_MAX\f1
|
|
The maximum number of queued signals.
|
|
.TP
|
|
\f4_SC_REALTIME_SIGNALS\f1
|
|
Always 1 on Irix, meaning that realtime signals are supported.
|
|
.TP
|
|
\f4_SC_ACL\f1
|
|
Returns 1 if Access Control Lists are supported.
|
|
.TP
|
|
\f4_SC_AUDIT\f1
|
|
Returns 1 if Auditing is supported.
|
|
.TP
|
|
\f4_SC_INF\f1
|
|
Returns 1 if Information Labels are supported.
|
|
.TP
|
|
\f4_SC_MAC\f1
|
|
Returns 1 if Mandatory Access Control is supported.
|
|
.TP
|
|
\f4_SC_CAP\f1
|
|
Returns 1 if Capabilities are supported.
|
|
.TP
|
|
\f4_SC_IP_SECOPTS\f1
|
|
Returns 1 if IP Security Options are supported.
|
|
.TP
|
|
\f4_SC_PRIORITIZED_IO\f1
|
|
Returns 1 if the POSIX 1003.1b prioritized input and output option is supported.
|
|
.TP
|
|
\f4_SC_AIO_MAX\f1
|
|
The maximum number of simultaneous asynchronous I/O requests outstanding.
|
|
.TP
|
|
\f4_SC_AIO_LISTIO_MAX\f1
|
|
The maximum number of queued asynchronous I/O requests.
|
|
.TP
|
|
\f4_SC_ASYNCHRONOUS_IO\f1
|
|
Always 1 on Irix, meaning that asynchronous i/o is supported.
|
|
.TP
|
|
\f4_SC_KERN_POINTERS\f1
|
|
Allows binaries to check if the running kernel is 32 bits
|
|
or 64 bits. Possible return values for 32 bit kernels are
|
|
\f4\-1\fP or \f432\fP. For 64 bit kernels the return value is \f464\fP.
|
|
.TP
|
|
\f4_SC_KERN_SIM\f1
|
|
Allows binaries to check if the running kernel is a 32, N32, or 64 bit
|
|
kernel. Possible return values are (defined in sgidefs.h) \f4_MIPS_SIM_ABI32\fP,
|
|
\f4_MIPS_SIM_NABI32\fP, \f4_MIPS_SIM_ABI64\fP, and \f4-1\fP for error.
|
|
.TP
|
|
\f4_SC_DELAYTIMER_MAX\f1
|
|
Maximum number of timer expiration overruns.
|
|
.TP
|
|
\f4_SC_MQ_OPEN_MAX\f1
|
|
The maximum number of open message queue descriptors that a process
|
|
may hold.
|
|
.TP
|
|
\f4_SC_MQ_PRIO_MAX\f1
|
|
The maximum number of message priorities supported.
|
|
.TP
|
|
\f4_SC_SEM_NSEMS_MAX\f1
|
|
The maximum number of semaphores that a process may have.
|
|
.TP
|
|
\f4_SC_SEM_VALUE_MAX\f1
|
|
The maximum value that a semaphore may have.
|
|
.TP
|
|
\f4_SC_TIMER_MAX\f1
|
|
Maximum number of timers supported per process.
|
|
.TP
|
|
\f4_SC_FSYNC\f1
|
|
Returns 1 if POSIX 1003.1b file synchronization is supported.
|
|
.TP
|
|
\f4_SC_MAPPED_FILES\f1
|
|
Returns 1 if POSIX 1003.1b mapped files option is supported.
|
|
.TP
|
|
\f4_SC_MEMLOCK\f1
|
|
Returns 1 if POSIX 1003.1b process memory locking option is supported.
|
|
.TP
|
|
\f4_SC_MEMLOCK_RANGE\f1
|
|
Returns 1 if POSIX 1003.1b range memory locking option is supported.
|
|
.TP
|
|
\f4_SC_MEMORY_PROTECTION\f1
|
|
Returns 1 if POSIX 1003.1b memory protection option is supported.
|
|
.TP
|
|
\f4_SC_MESSAGE_PASSING\f1
|
|
Returns 1 if POSIX 1003.1b message passing option is supported.
|
|
.TP
|
|
\f4_SC_PRIORITY_SCHEDULING\f1
|
|
Returns 1 if POSIX 1003.1b process scheduling option is supported.
|
|
.TP
|
|
\f4_SC_SEMAPHORES\f1
|
|
Returns 1 if POSIX 1003.1b semaphore option is supported.
|
|
.TP
|
|
\f4_SC_SHARED_MEMORY_OBJECTS\f1
|
|
Returns 1 if POSIX 1003.1b shared memory object option is supported.
|
|
.TP
|
|
\f4_SC_SYNCHRONIZED_IO\f1
|
|
Returns 1 if POSIX 1003.1b synchronized input and output option is
|
|
supported.
|
|
.TP
|
|
\f4_SC_TIMERS\f1
|
|
Returns 1 if POSIX 1003.1b timers option is supported.
|
|
.TP
|
|
\f4_SC_XOPEN_SHM\f1
|
|
If the X/Open Shared Memory Feature Group is supported, then a value of 1
|
|
is returned. If it is not supported then a value of -1 is returned.
|
|
.TP
|
|
\f4_SC_BC_BASE_MAX\f1
|
|
Returns the maximum \f2obase\fP value allowed by the \f4bc\fP utility.
|
|
.TP
|
|
\f4_SC_BC_DIM_MAX\f1
|
|
Returns the maximum number of elements permitted in an array by the
|
|
\f4bc\fP utility.
|
|
.TP
|
|
\f4_SC_BC_SCALE_MAX\f1
|
|
Returns the maximum \f2scale\fP value allowed by the \f4bc\fP utility.
|
|
.TP
|
|
\f4_SC_BC_STRING_MAX\f1
|
|
Returns the maximum length of a string constant accepted by the
|
|
\f4bc\fP utility.
|
|
.TP
|
|
\f4_SC_COLL_WEIGHTS_MAX\f1
|
|
Returns the maximum number of weights that can be assigned to an entry of
|
|
the \f4LC_COLLATE\fP \f2order\fP keyword in the locale definition file.
|
|
.TP
|
|
\f4_SC_EXPR_NEST_MAX\f1
|
|
Returns the maximum number of expressions that can be nested within parenthesis
|
|
by the \f2expr\fP utility.
|
|
.TP
|
|
\f4_SC_RE_DUP_MAX\f1
|
|
Returns the maximum number of repeated occurrences of a \f4BRE\fP permitted
|
|
when using the interval notation \f2\\{m,n\\}\fP.
|
|
.TP
|
|
\f4_SC_LINE_MAX\f1
|
|
Returns the maximum length, in bytes, of the input line of a utility
|
|
(either standard input or another file), when the utility is described
|
|
as processing text files.
|
|
The length includes room for the trailing \f2<newline>\fP.
|
|
Some utilities has different limits specified in their manual pages.
|
|
.TP
|
|
\f4_SC_XOPEN_CRYPT\f1
|
|
The encryption routines \f4crypt()\f1, \f4encrypt()\f1 and
|
|
\f4setkey()\f1 are always provided, and hence the setting
|
|
for this X/Open Feature Group is to return the value 1.
|
|
Note that in certain markets
|
|
the decryption algorithm may not be exported
|
|
and in that case, \f4encrypt()\f1 returns \f4ENOSYS\f1 for
|
|
the decryption operation.
|
|
.TP
|
|
\f4_SC_2_C_BIND\f1
|
|
Returns 1 if the POSIX 1003.2 C-language development facilities option is supported.
|
|
.TP
|
|
\f4_SC_2_LOCALEDEF\f1
|
|
Returns 1 if the POSIX 1003.2 creation of locales option is supported.
|
|
.TP
|
|
\f4_SC_2_C_DEV\f1
|
|
Returns 1 if the POSIX 1003.2 C-language development utilities option is supported.
|
|
.TP
|
|
\f4_SC_2_C_VERSION\f1
|
|
Returns the value of \f4POSIX2_C_VERSION\fP which indicates the version of
|
|
the POSIX 1003.2 standard C-language binding option that IRIX conforms to.
|
|
.TP
|
|
\f4_SC_2_CHAR_TERM\f1
|
|
Returns 1 if the system supports at least one terminal type
|
|
capable of all operations described in POSIX 1003.2.
|
|
.TP
|
|
\f4_SC_2_FORT_DEV\f1
|
|
Returns 1 if the POSIX 1003.2 FORTRAN development utilities option is supported.
|
|
.TP
|
|
\f4_SC_2_FORT_RUN\f1
|
|
Returns 1 if the POSIX 1003.2 FORTRAN runtime utilities option is supported.
|
|
.TP
|
|
\f4_SC_2_SW_DEV\f1
|
|
Returns 1 if the POSIX 1003.2 software development utilities option is supported.
|
|
.TP
|
|
\f4_SC_2_UPE\f1
|
|
Returns 1 if the POSIX 1003.2 user portability utilities option is supported.
|
|
.TP
|
|
\f4_SC_XOPEN_ENH_I18N\f1
|
|
Returns 1 if the X/Open enhanced internationalization feature group is supported.
|
|
.TP
|
|
\f4_SC_2_VERSION\f1
|
|
Returns the value of \f4POSIX2_VERSION\fP which indicates the version of
|
|
the POSIX 1003.2 standard that the utilities in IRIX conform to.
|
|
.TP
|
|
\f4_SC_GETGR_R_SIZE_MAX\f1
|
|
Maximum size of \f4getgrgid_r\fP(3C) and \f4getgrnam_r\fP(3C) data buffers.
|
|
.TP
|
|
\f4_SC_GETPW_R_SIZE_MAX\f1
|
|
Maximum size of \f4getpwuid_r\fP(3C) and \f4getpwnam_r\fP(3C) data buffers.
|
|
.TP
|
|
\f4_SC_LOGIN_NAME_MAX\f1
|
|
The size of storage required for a login name, in bytes, including the
|
|
terminating null.
|
|
.TP
|
|
\f4_SC_THREAD_DESTRUCTORS_ITERATIONS\f1
|
|
The number of attempts made to destroy a thread's thread-specific data values
|
|
on thread exit.
|
|
.TP
|
|
\f4_SC_THREAD_KEYS_MAX\f1
|
|
The number of data keys per process.
|
|
.TP
|
|
\f4_SC_THREAD_STACK_MIN\f1
|
|
The minimum size in bytes required for a thread stack.
|
|
.TP
|
|
\f4_SC_THREAD_THREADS_MAX\f1
|
|
The number of threads per process.
|
|
.TP
|
|
\f4_SC_TTY_NAME_MAX\f1
|
|
The size of storage required for a terminal device name, in bytes, including the
|
|
terminating null.
|
|
.TP
|
|
\f4_SC_THREADS\f1
|
|
Returns 1 if the POSIX 1003.1c threads option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_ATTR_STACKADDR\f1
|
|
Returns 1 if the POSIX 1003.1c thread stack address attribute option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_ATTR_STACKSIZE\f1
|
|
Returns 1 if the POSIX 1003.1c thread stack size attribute option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_PRIORITY_SCHEDULING\f1
|
|
Returns 1 if the POSIX 1003.1c thread execution scheduling option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_PRIO_INHERIT\f1
|
|
Returns 1 if the POSIX 1003.1c priority inheritance option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_PRIO_PROTECT\f1
|
|
Returns 1 if the POSIX 1003.1c priority protection option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_PROCESS_SHARED\f1
|
|
Returns 1 if the POSIX 1003.1c process-shared synchronization option is supported.
|
|
.TP
|
|
\f4_SC_THREAD_SAFE_FUNCTIONS\f1
|
|
Returns 1 if the POSIX 1003.1c thread-safe functions option is supported.
|
|
.TP
|
|
\f4_SC_MMAP_FIXED_ALIGNMENT\f1
|
|
The minimum alignment required for MAP_FIXED \f4mmap\fP(2) calls.
|
|
This is the same as \f4_SC_PAGESIZE\fP except on the MIPS R4000PC,
|
|
R4600 and R5000 processors.
|
|
.TP
|
|
\f4_SC_SOFTPOWER\f1
|
|
Returns 1 if softpower is supported.
|
|
.TP
|
|
\f4_SC_XBS5_ILP32_OFF32\f1
|
|
Always 1 on IRIX, since the compilation model -o32 is always supported.
|
|
.TP
|
|
\f4_SC_XBS5_ILP32_OFFBIG\f1
|
|
Always 1 on IRIX, since the compilation model -n32 is always supported.
|
|
.TP
|
|
\f4_SC_XBS5_LP64_OFF64\f1
|
|
Returns 1 if the -64 compilation model is supported on this
|
|
platform, -1 otherwise.
|
|
.TP
|
|
\f4_SC_XBS5_LPBIG_OFFBIG\f1
|
|
Returns 1 if the -64 compilation model is supported on this
|
|
platform, -1 otherwise.
|
|
.TP
|
|
\f4_SC_XOPEN_LEGACY\f1
|
|
If the X/Open Legacy Feature Group is supported, then a value of 1
|
|
is returned. If it is not supported then a value of -1 is returned.
|
|
Always 1 on IRIX and the Legacy features supported designated by the
|
|
word \f4LEGACY\f1 in the individual man pages.
|
|
.sp .5
|
|
.TE
|
|
.SH "SEE ALSO"
|
|
\f4fpathconf\fP(2), \f4sysconf\fP(1), \f4systune\fP(1M).
|
|
.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.
|
|
.ad
|