|
Packit |
7cfc04 |
'\" et
|
|
Packit |
7cfc04 |
.TH SYSCONF "3P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH PROLOG
|
|
Packit |
7cfc04 |
This manual page is part of the POSIX Programmer's Manual.
|
|
Packit |
7cfc04 |
The Linux implementation of this interface may differ (consult
|
|
Packit |
7cfc04 |
the corresponding Linux manual page for details of Linux behavior),
|
|
Packit |
7cfc04 |
or the interface may not be implemented on Linux.
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
sysconf
|
|
Packit |
7cfc04 |
\(em get configurable system variables
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.LP
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
#include <unistd.h>
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
long sysconf(int \fIname\fP);
|
|
Packit |
7cfc04 |
.fi
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIsysconf\fR()
|
|
Packit |
7cfc04 |
function provides a method for the application to determine the current
|
|
Packit |
7cfc04 |
value of a configurable system limit or option (\c
|
|
Packit |
7cfc04 |
.IR variable ).
|
|
Packit |
7cfc04 |
The implementation shall support all of the variables listed in the
|
|
Packit |
7cfc04 |
following table and may support others.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.IR name
|
|
Packit |
7cfc04 |
argument represents the system variable to be queried. The following
|
|
Packit |
7cfc04 |
table lists the minimal set of system variables from
|
|
Packit |
7cfc04 |
.IR <limits.h>
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
.IR <unistd.h>
|
|
Packit |
7cfc04 |
that can be returned by
|
|
Packit |
7cfc04 |
\fIsysconf\fR(),
|
|
Packit |
7cfc04 |
and the symbolic constants defined in
|
|
Packit |
7cfc04 |
.IR <unistd.h>
|
|
Packit |
7cfc04 |
that are the corresponding values used for
|
|
Packit |
7cfc04 |
.IR name .
|
|
Packit |
7cfc04 |
.ad l
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
box center tab(@);
|
|
Packit |
7cfc04 |
cB | cB
|
|
Packit |
7cfc04 |
lw(2.7i)1e | le.
|
|
Packit |
7cfc04 |
Variable@Value of Name
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
{AIO_LISTIO_MAX}@_SC_AIO_LISTIO_MAX
|
|
Packit |
7cfc04 |
{AIO_MAX}@_SC_AIO_MAX
|
|
Packit |
7cfc04 |
{AIO_PRIO_DELTA_MAX}@_SC_AIO_PRIO_DELTA_MAX
|
|
Packit |
7cfc04 |
{ARG_MAX}@_SC_ARG_MAX
|
|
Packit |
7cfc04 |
{ATEXIT_MAX}@_SC_ATEXIT_MAX
|
|
Packit |
7cfc04 |
{BC_BASE_MAX}@_SC_BC_BASE_MAX
|
|
Packit |
7cfc04 |
{BC_DIM_MAX}@_SC_BC_DIM_MAX
|
|
Packit |
7cfc04 |
{BC_SCALE_MAX}@_SC_BC_SCALE_MAX
|
|
Packit |
7cfc04 |
{BC_STRING_MAX}@_SC_BC_STRING_MAX
|
|
Packit |
7cfc04 |
{CHILD_MAX}@_SC_CHILD_MAX
|
|
Packit |
7cfc04 |
Clock ticks/second@_SC_CLK_TCK
|
|
Packit |
7cfc04 |
{COLL_WEIGHTS_MAX}@_SC_COLL_WEIGHTS_MAX
|
|
Packit |
7cfc04 |
{DELAYTIMER_MAX}@_SC_DELAYTIMER_MAX
|
|
Packit |
7cfc04 |
{EXPR_NEST_MAX}@_SC_EXPR_NEST_MAX
|
|
Packit |
7cfc04 |
{HOST_NAME_MAX}@_SC_HOST_NAME_MAX
|
|
Packit |
7cfc04 |
{IOV_MAX}@_SC_IOV_MAX
|
|
Packit |
7cfc04 |
{LINE_MAX}@_SC_LINE_MAX
|
|
Packit |
7cfc04 |
{LOGIN_NAME_MAX}@_SC_LOGIN_NAME_MAX
|
|
Packit |
7cfc04 |
{NGROUPS_MAX}@_SC_NGROUPS_MAX
|
|
Packit |
7cfc04 |
Initial size of \fIgetgrgid_r\fP\^(\|) and@_SC_GETGR_R_SIZE_MAX
|
|
Packit |
7cfc04 |
\fIgetgrnam_r\fP\^(\|) data buffers
|
|
Packit |
7cfc04 |
Initial size of \fIgetpwuid_r\fP\^(\|) and@_SC_GETPW_R_SIZE_MAX
|
|
Packit |
7cfc04 |
\fIgetpwnam_r\fP\^(\|) data buffers
|
|
Packit |
7cfc04 |
{MQ_OPEN_MAX}@_SC_MQ_OPEN_MAX
|
|
Packit |
7cfc04 |
{MQ_PRIO_MAX}@_SC_MQ_PRIO_MAX
|
|
Packit |
7cfc04 |
{OPEN_MAX}@_SC_OPEN_MAX
|
|
Packit |
7cfc04 |
_POSIX_ADVISORY_INFO@_SC_ADVISORY_INFO
|
|
Packit |
7cfc04 |
_POSIX_BARRIERS@_SC_BARRIERS
|
|
Packit |
7cfc04 |
_POSIX_ASYNCHRONOUS_IO@_SC_ASYNCHRONOUS_IO
|
|
Packit |
7cfc04 |
_POSIX_CLOCK_SELECTION@_SC_CLOCK_SELECTION
|
|
Packit |
7cfc04 |
_POSIX_CPUTIME@_SC_CPUTIME
|
|
Packit |
7cfc04 |
_POSIX_FSYNC@_SC_FSYNC
|
|
Packit |
7cfc04 |
_POSIX_IPV6@_SC_IPV6
|
|
Packit |
7cfc04 |
_POSIX_JOB_CONTROL@_SC_JOB_CONTROL
|
|
Packit |
7cfc04 |
_POSIX_MAPPED_FILES@_SC_MAPPED_FILES
|
|
Packit |
7cfc04 |
_POSIX_MEMLOCK@_SC_MEMLOCK
|
|
Packit |
7cfc04 |
_POSIX_MEMLOCK_RANGE@_SC_MEMLOCK_RANGE
|
|
Packit |
7cfc04 |
_POSIX_MEMORY_PROTECTION@_SC_MEMORY_PROTECTION
|
|
Packit |
7cfc04 |
_POSIX_MESSAGE_PASSING@_SC_MESSAGE_PASSING
|
|
Packit |
7cfc04 |
_POSIX_MONOTONIC_CLOCK@_SC_MONOTONIC_CLOCK
|
|
Packit |
7cfc04 |
_POSIX_PRIORITIZED_IO@_SC_PRIORITIZED_IO
|
|
Packit |
7cfc04 |
_POSIX_PRIORITY_SCHEDULING@_SC_PRIORITY_SCHEDULING
|
|
Packit |
7cfc04 |
_POSIX_RAW_SOCKETS@_SC_RAW_SOCKETS
|
|
Packit |
7cfc04 |
_POSIX_READER_WRITER_LOCKS@_SC_READER_WRITER_LOCKS
|
|
Packit |
7cfc04 |
_POSIX_REALTIME_SIGNALS@_SC_REALTIME_SIGNALS
|
|
Packit |
7cfc04 |
_POSIX_REGEXP@_SC_REGEXP
|
|
Packit |
7cfc04 |
_POSIX_SAVED_IDS@_SC_SAVED_IDS
|
|
Packit |
7cfc04 |
_POSIX_SEMAPHORES@_SC_SEMAPHORES
|
|
Packit |
7cfc04 |
_POSIX_SHARED_MEMORY_OBJECTS@_SC_SHARED_MEMORY_OBJECTS
|
|
Packit |
7cfc04 |
_POSIX_SHELL@_SC_SHELL
|
|
Packit |
7cfc04 |
_POSIX_SPAWN@_SC_SPAWN
|
|
Packit |
7cfc04 |
_POSIX_SPIN_LOCKS@_SC_SPIN_LOCKS
|
|
Packit |
7cfc04 |
_POSIX_SPORADIC_SERVER@_SC_SPORADIC_SERVER
|
|
Packit |
7cfc04 |
_POSIX_SS_REPL_MAX@_SC_SS_REPL_MAX
|
|
Packit |
7cfc04 |
_POSIX_SYNCHRONIZED_IO@_SC_SYNCHRONIZED_IO
|
|
Packit |
7cfc04 |
_POSIX_THREAD_ATTR_STACKADDR@_SC_THREAD_ATTR_STACKADDR
|
|
Packit |
7cfc04 |
_POSIX_THREAD_ATTR_STACKSIZE@_SC_THREAD_ATTR_STACKSIZE
|
|
Packit |
7cfc04 |
_POSIX_THREAD_CPUTIME@_SC_THREAD_CPUTIME
|
|
Packit |
7cfc04 |
_POSIX_THREAD_PRIO_INHERIT@_SC_THREAD_PRIO_INHERIT
|
|
Packit |
7cfc04 |
_POSIX_THREAD_PRIO_PROTECT@_SC_THREAD_PRIO_PROTECT
|
|
Packit |
7cfc04 |
_POSIX_THREAD_PRIORITY_SCHEDULING@_SC_THREAD_PRIORITY_SCHEDULING
|
|
Packit |
7cfc04 |
_POSIX_THREAD_PROCESS_SHARED@_SC_THREAD_PROCESS_SHARED
|
|
Packit |
7cfc04 |
_POSIX_THREAD_ROBUST_PRIO_INHERIT@_SC_THREAD_ROBUST_PRIO_INHERIT
|
|
Packit |
7cfc04 |
_POSIX_THREAD_ROBUST_PRIO_PROTECT@_SC_THREAD_ROBUST_PRIO_PROTECT
|
|
Packit |
7cfc04 |
_POSIX_THREAD_SAFE_FUNCTIONS@_SC_THREAD_SAFE_FUNCTIONS
|
|
Packit |
7cfc04 |
_POSIX_THREAD_SPORADIC_SERVER@_SC_THREAD_SPORADIC_SERVER
|
|
Packit |
7cfc04 |
_POSIX_THREADS@_SC_THREADS
|
|
Packit |
7cfc04 |
_POSIX_TIMEOUTS@_SC_TIMEOUTS
|
|
Packit |
7cfc04 |
_POSIX_TIMERS@_SC_TIMERS
|
|
Packit |
7cfc04 |
_POSIX_TRACE@_SC_TRACE
|
|
Packit |
7cfc04 |
_POSIX_TRACE_EVENT_FILTER@_SC_TRACE_EVENT_FILTER
|
|
Packit |
7cfc04 |
_POSIX_TRACE_EVENT_NAME_MAX@_SC_TRACE_EVENT_NAME_MAX
|
|
Packit |
7cfc04 |
_POSIX_TRACE_INHERIT@_SC_TRACE_INHERIT
|
|
Packit |
7cfc04 |
_POSIX_TRACE_LOG@_SC_TRACE_LOG
|
|
Packit |
7cfc04 |
_POSIX_TRACE_NAME_MAX@_SC_TRACE_NAME_MAX
|
|
Packit |
7cfc04 |
_POSIX_TRACE_SYS_MAX@_SC_TRACE_SYS_MAX
|
|
Packit |
7cfc04 |
_POSIX_TRACE_USER_EVENT_MAX@_SC_TRACE_USER_EVENT_MAX
|
|
Packit |
7cfc04 |
_POSIX_TYPED_MEMORY_OBJECTS@_SC_TYPED_MEMORY_OBJECTS
|
|
Packit |
7cfc04 |
_POSIX_VERSION@_SC_VERSION
|
|
Packit |
7cfc04 |
_POSIX_V7_ILP32_OFF32@_SC_V7_ILP32_OFF32
|
|
Packit |
7cfc04 |
_POSIX_V7_ILP32_OFFBIG@_SC_V7_ILP32_OFFBIG
|
|
Packit |
7cfc04 |
_POSIX_V7_LP64_OFF64@_SC_V7_LP64_OFF64
|
|
Packit |
7cfc04 |
_POSIX_V7_LPBIG_OFFBIG@_SC_V7_LPBIG_OFFBIG
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.ad l
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
box center tab(@);
|
|
Packit |
7cfc04 |
cB | cB
|
|
Packit |
7cfc04 |
lw(2.6i)1e | le.
|
|
Packit |
7cfc04 |
Variable@Value of Name
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
_POSIX_V6_ILP32_OFF32@_SC_V6_ILP32_OFF32
|
|
Packit |
7cfc04 |
_POSIX_V6_ILP32_OFFBIG@_SC_V6_ILP32_OFFBIG
|
|
Packit |
7cfc04 |
_POSIX_V6_LP64_OFF64@_SC_V6_LP64_OFF64
|
|
Packit |
7cfc04 |
_POSIX_V6_LPBIG_OFFBIG@_SC_V6_LPBIG_OFFBIG
|
|
Packit |
7cfc04 |
_POSIX2_C_BIND@_SC_2_C_BIND
|
|
Packit |
7cfc04 |
_POSIX2_C_DEV@_SC_2_C_DEV
|
|
Packit |
7cfc04 |
_POSIX2_CHAR_TERM@_SC_2_CHAR_TERM
|
|
Packit |
7cfc04 |
_POSIX2_FORT_DEV@_SC_2_FORT_DEV
|
|
Packit |
7cfc04 |
_POSIX2_FORT_RUN@_SC_2_FORT_RUN
|
|
Packit |
7cfc04 |
_POSIX2_LOCALEDEF@_SC_2_LOCALEDEF
|
|
Packit |
7cfc04 |
_POSIX2_PBS@_SC_2_PBS
|
|
Packit |
7cfc04 |
_POSIX2_PBS_ACCOUNTING@_SC_2_PBS_ACCOUNTING
|
|
Packit |
7cfc04 |
_POSIX2_PBS_CHECKPOINT@_SC_2_PBS_CHECKPOINT
|
|
Packit |
7cfc04 |
_POSIX2_PBS_LOCATE@_SC_2_PBS_LOCATE
|
|
Packit |
7cfc04 |
_POSIX2_PBS_MESSAGE@_SC_2_PBS_MESSAGE
|
|
Packit |
7cfc04 |
_POSIX2_PBS_TRACK@_SC_2_PBS_TRACK
|
|
Packit |
7cfc04 |
_POSIX2_SW_DEV@_SC_2_SW_DEV
|
|
Packit |
7cfc04 |
_POSIX2_UPE@_SC_2_UPE
|
|
Packit |
7cfc04 |
_POSIX2_VERSION@_SC_2_VERSION
|
|
Packit |
7cfc04 |
{PAGE_SIZE}@_SC_PAGE_SIZE
|
|
Packit |
7cfc04 |
{PAGESIZE}@_SC_PAGESIZE
|
|
Packit |
7cfc04 |
{PTHREAD_DESTRUCTOR_ITERATIONS}@_SC_THREAD_DESTRUCTOR_ITERATIONS
|
|
Packit |
7cfc04 |
{PTHREAD_KEYS_MAX}@_SC_THREAD_KEYS_MAX
|
|
Packit |
7cfc04 |
{PTHREAD_STACK_MIN}@_SC_THREAD_STACK_MIN
|
|
Packit |
7cfc04 |
{PTHREAD_THREADS_MAX}@_SC_THREAD_THREADS_MAX
|
|
Packit |
7cfc04 |
{RE_DUP_MAX}@_SC_RE_DUP_MAX
|
|
Packit |
7cfc04 |
{RTSIG_MAX}@_SC_RTSIG_MAX
|
|
Packit |
7cfc04 |
{SEM_NSEMS_MAX}@_SC_SEM_NSEMS_MAX
|
|
Packit |
7cfc04 |
{SEM_VALUE_MAX}@_SC_SEM_VALUE_MAX
|
|
Packit |
7cfc04 |
{SIGQUEUE_MAX}@_SC_SIGQUEUE_MAX
|
|
Packit |
7cfc04 |
{STREAM_MAX}@_SC_STREAM_MAX
|
|
Packit |
7cfc04 |
{SYMLOOP_MAX}@_SC_SYMLOOP_MAX
|
|
Packit |
7cfc04 |
{TIMER_MAX}@_SC_TIMER_MAX
|
|
Packit |
7cfc04 |
{TTY_NAME_MAX}@_SC_TTY_NAME_MAX
|
|
Packit |
7cfc04 |
{TZNAME_MAX}@_SC_TZNAME_MAX
|
|
Packit |
7cfc04 |
_XOPEN_CRYPT@_SC_XOPEN_CRYPT
|
|
Packit |
7cfc04 |
_XOPEN_ENH_I18N@_SC_XOPEN_ENH_I18N
|
|
Packit |
7cfc04 |
_XOPEN_REALTIME@_SC_XOPEN_REALTIME
|
|
Packit |
7cfc04 |
_XOPEN_REALTIME_THREADS@_SC_XOPEN_REALTIME_THREADS
|
|
Packit |
7cfc04 |
_XOPEN_SHM@_SC_XOPEN_SHM
|
|
Packit |
7cfc04 |
_XOPEN_STREAMS@_SC_XOPEN_STREAMS
|
|
Packit |
7cfc04 |
_XOPEN_UNIX@_SC_XOPEN_UNIX
|
|
Packit |
7cfc04 |
_XOPEN_UUCP@_SC_XOPEN_UUCP
|
|
Packit |
7cfc04 |
_XOPEN_VERSION@_SC_XOPEN_VERSION
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.ad b
|
|
Packit |
7cfc04 |
.SH "RETURN VALUE"
|
|
Packit |
7cfc04 |
If
|
|
Packit |
7cfc04 |
.IR name
|
|
Packit |
7cfc04 |
is an invalid value,
|
|
Packit |
7cfc04 |
\fIsysconf\fR()
|
|
Packit |
7cfc04 |
shall return \(mi1 and set
|
|
Packit |
7cfc04 |
.IR errno
|
|
Packit |
7cfc04 |
to indicate the error. If the variable corresponding to
|
|
Packit |
7cfc04 |
.IR name
|
|
Packit |
7cfc04 |
is described in
|
|
Packit |
7cfc04 |
.IR <limits.h>
|
|
Packit |
7cfc04 |
as a maximum or minimum value and the variable has no limit,
|
|
Packit |
7cfc04 |
\fIsysconf\fR()
|
|
Packit |
7cfc04 |
shall return \(mi1 without changing the value of
|
|
Packit |
7cfc04 |
.IR errno .
|
|
Packit |
7cfc04 |
Note that indefinite limits do not imply infinite limits; see
|
|
Packit |
7cfc04 |
.IR <limits.h> .
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Otherwise,
|
|
Packit |
7cfc04 |
\fIsysconf\fR()
|
|
Packit |
7cfc04 |
shall return the current variable value on the system. The value
|
|
Packit |
7cfc04 |
returned shall not be more restrictive than the corresponding value
|
|
Packit |
7cfc04 |
described to the application when it was compiled with the
|
|
Packit |
7cfc04 |
implementation's
|
|
Packit |
7cfc04 |
.IR <limits.h>
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
.IR <unistd.h> .
|
|
Packit |
7cfc04 |
The value shall not change during the lifetime of the calling process,
|
|
Packit |
7cfc04 |
except that \fIsysconf\fP(_SC_OPEN_MAX) may return different values
|
|
Packit |
7cfc04 |
before and after a call to
|
|
Packit |
7cfc04 |
\fIsetrlimit\fR()
|
|
Packit |
7cfc04 |
which changes the RLIMIT_NOFILE soft limit.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
If the variable corresponding to
|
|
Packit |
7cfc04 |
.IR name
|
|
Packit |
7cfc04 |
is dependent on an unsupported option, the results are unspecified.
|
|
Packit |
7cfc04 |
.SH ERRORS
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
\fIsysconf\fR()
|
|
Packit |
7cfc04 |
function shall fail if:
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR EINVAL
|
|
Packit |
7cfc04 |
The value of the
|
|
Packit |
7cfc04 |
.IR name
|
|
Packit |
7cfc04 |
argument is invalid.
|
|
Packit |
7cfc04 |
.LP
|
|
Packit |
7cfc04 |
.IR "The following sections are informative."
|
|
Packit |
7cfc04 |
.SH EXAMPLES
|
|
Packit |
7cfc04 |
None.
|
|
Packit |
7cfc04 |
.SH "APPLICATION USAGE"
|
|
Packit |
7cfc04 |
As \(mi1 is a permissible return value in a successful situation, an
|
|
Packit |
7cfc04 |
application wishing to check for error situations should set
|
|
Packit |
7cfc04 |
.IR errno
|
|
Packit |
7cfc04 |
to 0, then call
|
|
Packit |
7cfc04 |
\fIsysconf\fR(),
|
|
Packit |
7cfc04 |
and, if it returns \(mi1, check to see if
|
|
Packit |
7cfc04 |
.IR errno
|
|
Packit |
7cfc04 |
is non-zero.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Application developers should check whether an option, such as
|
|
Packit |
7cfc04 |
_POSIX_TRACE, is supported prior to obtaining and using values for
|
|
Packit |
7cfc04 |
related variables, such as _POSIX_TRACE_NAME_MAX.
|
|
Packit |
7cfc04 |
.SH RATIONALE
|
|
Packit |
7cfc04 |
This functionality was added in response to requirements of application
|
|
Packit |
7cfc04 |
developers and of system vendors who deal with many international
|
|
Packit |
7cfc04 |
system configurations. It is closely related to
|
|
Packit |
7cfc04 |
\fIpathconf\fR()
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
\fIfpathconf\fR().
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Although a conforming application can run on all systems by never
|
|
Packit |
7cfc04 |
demanding more resources than the minimum values published in this volume of POSIX.1\(hy2008, it
|
|
Packit |
7cfc04 |
is useful for that application to be able to use the actual value for
|
|
Packit |
7cfc04 |
the quantity of a resource available on any given system. To do this,
|
|
Packit |
7cfc04 |
the application makes use of the value of a symbolic constant in
|
|
Packit |
7cfc04 |
.IR <limits.h>
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
.IR <unistd.h> .
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
However, once compiled, the application must still be able to cope if
|
|
Packit |
7cfc04 |
the amount of resource available is increased. To that end, an
|
|
Packit |
7cfc04 |
application may need a means of determining the quantity of a resource,
|
|
Packit |
7cfc04 |
or the presence of an option, at execution time.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Two examples are offered:
|
|
Packit |
7cfc04 |
.IP " 1." 4
|
|
Packit |
7cfc04 |
Applications may wish to act differently on systems with or without job
|
|
Packit |
7cfc04 |
control.
|
|
Packit |
7cfc04 |
Applications vendors who wish to distribute only a single binary
|
|
Packit |
7cfc04 |
package to all instances of a computer architecture would be forced to
|
|
Packit |
7cfc04 |
assume job control is never available if it were to rely solely on the
|
|
Packit |
7cfc04 |
.IR <unistd.h>
|
|
Packit |
7cfc04 |
value published in this volume of POSIX.1\(hy2008.
|
|
Packit |
7cfc04 |
.IP " 2." 4
|
|
Packit |
7cfc04 |
International applications vendors occasionally require knowledge of
|
|
Packit |
7cfc04 |
the number of clock ticks per second.
|
|
Packit |
7cfc04 |
Without these facilities, they would be required to either distribute
|
|
Packit |
7cfc04 |
their applications partially in source form or to have 50 Hz and 60 Hz
|
|
Packit |
7cfc04 |
versions for the various countries in which they operate.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
It is the knowledge that many applications are actually distributed
|
|
Packit |
7cfc04 |
widely in executable form that leads to this facility. If limited to
|
|
Packit |
7cfc04 |
the most restrictive values in the headers, such applications would
|
|
Packit |
7cfc04 |
have to be prepared to accept the most limited environments offered by
|
|
Packit |
7cfc04 |
the smallest microcomputers. Although this is entirely portable, there
|
|
Packit |
7cfc04 |
was a consensus that they should be able to take advantage of the
|
|
Packit |
7cfc04 |
facilities offered by large systems, without the restrictions
|
|
Packit |
7cfc04 |
associated with source and object distributions.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
During the discussions of this feature, it was pointed out that it is
|
|
Packit |
7cfc04 |
almost always possible for an application to discern what a value might
|
|
Packit |
7cfc04 |
be at runtime by suitably testing the various functions themselves.
|
|
Packit |
7cfc04 |
And, in any event, it could always be written to adequately deal with
|
|
Packit |
7cfc04 |
error returns from the various functions. In the end, it was felt that
|
|
Packit |
7cfc04 |
this imposed an unreasonable level of complication and sophistication
|
|
Packit |
7cfc04 |
on the application developer.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
This runtime facility is not meant to provide ever-changing values
|
|
Packit |
7cfc04 |
that applications have to check multiple times. The values are seen as
|
|
Packit |
7cfc04 |
changing no more frequently than once per system initialization, such
|
|
Packit |
7cfc04 |
as by a system administrator or operator with an automatic
|
|
Packit |
7cfc04 |
configuration program. This volume of POSIX.1\(hy2008 specifies that they shall not change
|
|
Packit |
7cfc04 |
within the lifetime of the process.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Some values apply to the system overall and others vary at the file
|
|
Packit |
7cfc04 |
system or directory level. The latter are described in
|
|
Packit |
7cfc04 |
.IR "\fIfpathconf\fR\^(\|)".
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Note that all values returned must be expressible as integers. String
|
|
Packit |
7cfc04 |
values were considered, but the additional flexibility of this approach
|
|
Packit |
7cfc04 |
was rejected due to its added complexity of implementation and use.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Some values, such as
|
|
Packit |
7cfc04 |
{PATH_MAX},
|
|
Packit |
7cfc04 |
are sometimes so large that they must not be used to, say, allocate
|
|
Packit |
7cfc04 |
arrays. The
|
|
Packit |
7cfc04 |
\fIsysconf\fR()
|
|
Packit |
7cfc04 |
function returns a negative value to show that this symbolic constant
|
|
Packit |
7cfc04 |
is not even defined in this case.
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
Similar to
|
|
Packit |
7cfc04 |
\fIpathconf\fR(),
|
|
Packit |
7cfc04 |
this permits the implementation not to have a limit. When one resource
|
|
Packit |
7cfc04 |
is infinite, returning an error indicating that some other resource
|
|
Packit |
7cfc04 |
limit has been reached is conforming behavior.
|
|
Packit |
7cfc04 |
.SH "FUTURE DIRECTIONS"
|
|
Packit |
7cfc04 |
None.
|
|
Packit |
7cfc04 |
.SH "SEE ALSO"
|
|
Packit |
7cfc04 |
.IR "\fIconfstr\fR\^(\|)",
|
|
Packit |
7cfc04 |
.IR "\fIfpathconf\fR\^(\|)"
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The Base Definitions volume of POSIX.1\(hy2008,
|
|
Packit |
7cfc04 |
.IR "\fB<limits.h>\fP",
|
|
Packit |
7cfc04 |
.IR "\fB<unistd.h>\fP"
|
|
Packit |
7cfc04 |
.P
|
|
Packit |
7cfc04 |
The Shell and Utilities volume of POSIX.1\(hy2008,
|
|
Packit |
7cfc04 |
.IR "\fIgetconf\fR\^"
|
|
Packit |
7cfc04 |
.SH COPYRIGHT
|
|
Packit |
7cfc04 |
Portions of this text are reprinted and reproduced in electronic form
|
|
Packit |
7cfc04 |
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
|
|
Packit |
7cfc04 |
-- Portable Operating System Interface (POSIX), The Open Group Base
|
|
Packit |
7cfc04 |
Specifications Issue 7, Copyright (C) 2013 by the Institute of
|
|
Packit |
7cfc04 |
Electrical and Electronics Engineers, Inc and The Open Group.
|
|
Packit |
7cfc04 |
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
|
|
Packit |
7cfc04 |
event of any discrepancy between this version and the original IEEE and
|
|
Packit |
7cfc04 |
The Open Group Standard, the original IEEE and The Open Group Standard
|
|
Packit |
7cfc04 |
is the referee document. The original Standard can be obtained online at
|
|
Packit |
7cfc04 |
http://www.unix.org/online.html .
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
Any typographical or formatting errors that appear
|
|
Packit |
7cfc04 |
in this page are most likely
|
|
Packit |
7cfc04 |
to have been introduced during the conversion of the source files to
|
|
Packit |
7cfc04 |
man page format. To report such errors, see
|
|
Packit |
7cfc04 |
https://www.kernel.org/doc/man-pages/reporting_bugs.html .
|