diff options
author | sandra <sandra> | 1991-08-09 17:10:09 +0000 |
---|---|---|
committer | sandra <sandra> | 1991-08-09 17:10:09 +0000 |
commit | 24549aa12a1a99e956cfc48f5f9b8701d17b1bc3 (patch) | |
tree | 3606c2174dcefb569cfa8ffab3a2ee4b918519e9 /manual/conf.texi | |
parent | 3983b55cc18b6a51f0d714d2c74bc4ba429f8c7c (diff) |
Initial revision
Diffstat (limited to 'manual/conf.texi')
-rw-r--r-- | manual/conf.texi | 593 |
1 files changed, 593 insertions, 0 deletions
diff --git a/manual/conf.texi b/manual/conf.texi new file mode 100644 index 0000000000..f6d0520a65 --- /dev/null +++ b/manual/conf.texi @@ -0,0 +1,593 @@ +@chapter System Configuration Limits +@node System Configuration Limits + +The functions and macros listed in this chapter describe various operating +system limits. + +@iftex +@itemize @bullet + +@item +@ref{File System Parameters}, contains informations about constants and +functions that describe various file system limits, such as the maximum +length of a file name. + +@item +@ref{System Parameters}, contains information about constants and functions +that describe various process-related limits (such as the maximum number +of processes that can belong to a single user) and optional features supported +by the operating system. + +@item +@ref{String-Valued Parameters}, contains information about additional +constants and functions for string-valued system parameters. +@end itemize +@end iftex + +@menu +* File System Parameters:: Constants and functions that describe + various file system limits. + +* System Parameters:: Constants and functions that describe + various process-related limits. + +* String-Valued Parameters:: Constants and functions that describe + string-valued limits. +@end menu + + +@node File System Parameters +@section File System Parameters + +The POSIX.1 standard specifies a number of symbolic constants that +represent the values for certain limits related to the file system, such +as the maximum length of a file name component. However, some of these +limits might not really be constants in a given implementation. For +example, in a nonhomogeneous networked environment, files mounted from +different hosts might be subject to different sets of limitations. + +In order to deal with the problem of variable limits, for most of these +parameters there is one symbolic constant that defines the most +restrictive limit permissible by the POSIX standard. If the actual +limit placed by a particular implementation for that parameter is a +constant, then it defines another constant to represent it. Otherwise, +the actual limit that applies to a particular file can be requested at +runtime by calling @code{pathconf} or @code{fpathconf}. + +Except for @code{FILENAME_MAX}, which is defined in @file{<stdio.h>}, +definitions for the following symbolic constants appear in the header +file @file{<limits.h>}. All of these macros expand into integer +constant values. + +@strong{Incomplete:} What does the GNU system do? + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_LINK_MAX +This macro represents the most restrictive limit permitted by POSIX +for the maximum value of a file's link count. The value of this +constant is @code{8}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro LINK_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_LINK_MAX}, but is defined only if the limit for the +particular implementation is constant for all files. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_MAX_CANON +This macro represents the most restrictive limit permitted by POSIX +for the maximum number of bytes in a canonical input line from a +terminal device. The value of this constant is @code{255}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro MAX_CANON +This is the actual implementation limit corresponding to +@code{_POSIX_MAX_CANON}, but is defined only if the limit for the +particular implementation is constant for all files. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_MAX_INPUT +This macro represents the most restrictive limit permitted by POSIX for +the maximum number of bytes in a terminal device input queue (or +typeahead buffer). @xref{Input Modes}. The value of this constant is +@code{255}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro MAX_INPUT +This is the actual implementation limit corresponding to +@code{_POSIX_MAX_INPUT}, but is defined only if the limit for the +particular implementation is a constant for all files. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_NAME_MAX +This macro represents the most restrictive limit permitted by POSIX for +the maximum number of bytes in a file name component. The value of this +constant is @code{14}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro NAME_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_NAME_MAX}, but is defined only if the limit for the +particular implementation is a constant for all files. +@end defvr + +@comment dirent.h +@comment BSD, GNU +@defvr Macro MAXNAMLEN +This is the BSD name for @code{NAME_MAX}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_PATH_MAX +This macro represents the most restrictive limit permitted by POSIX for +the maximum number of bytes in a file name. The value of this constant +is @code{255}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro PATH_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_PATH_MAX}, but is defined only if the limit for the +particular implementation is a constant for all files. +@end defvr + +@comment stdio.h +@comment ANSI +@defvr {Macro} FILENAME_MAX +The value of this macro is an integer constant expression that +represents the maximum length of a file name string. + +Unlike @code{PATH_MAX}, this macro is defined even if there is no actual +limit imposed. In such a case, its value is typically a very large +number. Don't try to use @code{FILENAME_MAX} as the size of an +array in which to store a file name! Use dynamic allocation +(@pxref{Memory Allocation}) instead. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_PIPE_BUF +This macro represents the most restrictive limit permitted by POSIX for +the maximum number of bytes that can be written atomically to a pipe. +If multiple processes are writing to the same pipe simultaneously, +output from different processes might appear in interleaved chunks of +this size. The value of this constant is @code{512}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _PIPE_BUF +This is the actual implementation limit corresponding to +@code{_POSIX_PIPE_BUF}, but is defined only if the limit for the +particular implementation is a constant for all pipes and FIFO files. +@end defvr + + +There are also these macros which may be defined in @file{<unistd.h>} to +describe additional characteristics of the file system. If any of these +macros are not defined at all, then the corresponding parameter depends +on the file to which it is applied, and you must use the @code{pathconf} +function at runtime to determine the parameter value. If the value is +defined to be @code{-1}, then the option does not apply to any file. +Otherwise, the option applies to all files. + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _POSIX_CHOWN_RESTRICTED +If this option is enabled, the @code{chown} function is restricted so +that the only changes permitted to nonprivileged processes is to change +the group owner of a file to either be the effective group ID of the +process, or one of its supplementary group IDs. @xref{File Ownership}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _POSIX_NO_TRUNC +If this option is enabled, file name components longer than @code{NAME_MAX} +generate an @code{ENAMETOOLONG} error. Otherwise, file name components +that are too long are silently truncated. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _POSIX_VDISABLE +This option is only meaningful for files that are terminal devices. +If it is enabled, then handling for special control characters can +be disabled individually. @xref{Special Characters}. +@end defvr + +For each of the above parameters, if the value is not a constant +for all files, you can request the value that applies to a particular +file using the @code{pathconf} or @code{fpathconf}. These functions +and the associated @var{parameter} constants are declared in the +header file @file{<unistd.h>}. + +@comment unistd.h +@comment POSIX.1 +@deftypefun long pathconf (const char *@var{filename}, int @var{parameter}) +This function is used to inquire about the limits that apply to +the file named @var{filename}. + +The @var{parameter} argument should be one of the @samp{_PC_} constants +listed below. + +The normal return value from @code{pathconf} is the value you requested. +A value of @code{-1} is returned both if the implementation does not +impose a limit, and in case of an error. In the former case, @code{errno} +is not set, while in the latter case, @code{errno} is set to indicate +the cause of the problem. Besides the usual file name syntax errors +(@pxref{File Name Errors}), the following error conditions are defined +for this function: + +@table @code +@item EINVAL +The value of @var{parameter} is invalid, or the implementation doesn't +support the @var{parameter} for the specific file. +@end table +@end deftypefun + +@comment unistd.h +@comment POSIX.1 +@deftypefun long fpathconf (int @var{filedes}, int @var{parameter}) +This is just like @code{pathconf} except that an open file descriptor +is used to specify the file for which information is requested, instead +of a file name. + +The following @code{errno} error conditions are defined for this function: + +@table @code +@item EBADF +The @var{filedes} argument is not a valid file descriptor. + +@item EINVAL +The value of @var{parameter} is invalid, or the implementation doesn't +support the @var{parameter} for the specific file. +@end table +@end deftypefun + +These symbolic constants are defined for use as the @var{parameter} +argument to @code{pathconf} and @code{fpathconf}. The values are +all integer constants. + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_LINK_MAX +Inquire about the parameter corresponding to @code{LINK_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_MAX_CANON +Inquire about the parameter corresponding to @code{MAX_CANON}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_MAX_INPUT +Inquire about the parameter corresponding to @code{MAX_INPUT}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_NAME_MAX +Inquire about the parameter corresponding to @code{NAME_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_PATH_MAX +Inquire about the parameter corresponding to @code{PATH_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_PIPE_BUF +Inquire about the parameter corresponding to @code{PIPE_BUF}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_CHOWN_RESTRICTED +Inquire about the parameter corresponding to @code{_POSIX_CHOWN_RESTRICTED}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_NO_TRUNC +Inquire about the parameter corresponding to @code{_POSIX_NO_TRUNC}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _PC_VDISABLE +Inquire about the parameter corresponding to @code{_POSIX_VDISABLE}. +@end defvr + + +@node System Parameters +@section System Parameters + +The POSIX.1 and POSIX.2 standards specify a number of symbolic constants that +represent the values for certain system limits, such as the maximum +number of simultaneous processes per user. However, some of these +limits might not really be constant in a given implementation. In a +typical Unix environment, for example, the values are determined from a +configuration file used in building the operating system kernel, and can +be changed without invalidating already-compiled programs by rebooting +the machine with a different kernel. Other parameters might depend on +the amount of memory available. + +In order to deal with the problem of variable limits, for most of these +parameters there is one symbolic constant that defines the most +restrictive limit permissible by the POSIX standard. If the actual +limit placed by a particular implementation for that parameter is a +constant, then it defines another symbolic constant to represent it. +Otherwise, the actual limit can be requested at runtime by calling the +@code{sysconf} function. + +Definitions for the following macros appear in the header file +@file{<limits.h>}. The values of the macros are all integer constants. + +@strong{Incomplete:} What does the GNU system do for the +implementation-defined macros? + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_ARG_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum combined length of the @var{argv} and @var{environ} +arguments that can be passed to the @code{exec} functions. The value of +this constant is @code{4096}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro ARG_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_ARG_MAX}, but is defined only if the limit for the +particular implementation is a constant. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_CHILD_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum number of simultaneous processes per real user ID. Its +value is @code{6}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro CHILD_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_CHILD_MAX}, but is defined only if the limit for the +particular implementation is a constant. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_OPEN_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum number of files that a single process can have open +simultaneously. The value of this constant is @code{16}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro OPEN_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_OPEN_MAX}, but is defined only if the limit for the +particular implementation is a constant. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_STREAM_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum number of streams that a single process can have open +simultaneously. The value of this constant is @code{8}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro STREAM_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_STREAM_MAX}, but is defined only if the limit for the +particular implementation is a constant. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_TZNAME_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum length of a time zone name. The value of this constant +is @code{3}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro TZNAME_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_TZNAME_MAX}, but is defined only if the limit for the +particular implementation is a constant. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_NGROUPS_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum number of supplementary group IDs per process. The +value of the constant is @code{0}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro NGROUPS_MAX +This corresponds to @code{_POSIX_NGROUPS_MAX}, but represents the +minimum value guaranteed by the implementation. This macro is defined +even if the limit for the particular implementation is not a constant. +(The actual maximum might be larger, and can be accessed with the +@code{sysconf} function.) +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro _POSIX_SSIZE_MAX +The value of this macro is the most restrictive limit permitted by POSIX +for the maximum value that can be stored in an object of type @code{ssize_t}. +(Effectively, this is the limit on the number of bytes that can be read +or written in a single operation. The value of this constant is +@code{32767}. +@end defvr + +@comment limits.h +@comment POSIX.1 +@defvr Macro SSIZE_MAX +This is the actual implementation limit corresponding to +@code{_POSIX_SSIZE_MAX}. This macro is always defined and its value is +a constant within a given implementation. +@end defvr + +Definitions for these additional macros that describe system parameters +appear in the header file @file{<unistd.h>}. + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _POSIX_JOB_CONTROL +If this symbol is defined, it indicates that the system supports job +control. Otherwise, the implementation behaves as if all processes +within a session belong to a single process group. @xref{Job Control}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _POSIX_SAVED_IDS +If this symbol is defined, it indicates that the system remembers the +effective user and group IDs of an executable file with the set-user-ID +or set-group-ID bits set, and that explicitly changing the effective +user or group IDs back to these values is permitted. If this option is +not defined, then if a nonprivileged process changes its effective user +or group ID to the real user or group ID of the process, it can't change +it back again. @xref{User/Group IDs of a Process}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _POSIX_VERSION +This constant represents the version of the POSIX standard to which +the implementation conforms. For an implementation conforming to the +1990 POSIX.1 standard, the value is the integer @code{199009L}. +@end defvr + +You can request the actual runtime values of these parameters using the +@code{sysconf} function. This function and the macros for use as its +@var{parameter} argument are declared in the header file +@file{<unistd.h>}. + +@comment unistd.h +@comment POSIX.1 +@deftypefun long sysconf (int @var{parameter}) +This function is used to inquire about runtime system parameters. +The @var{parameter} argument should be one of the @samp{_SC_} macros +listed below. + +The normal return value from @code{sysconf} is the value you requested. +A value of @code{-1} is returned both if the implementation does not +impose a limit, and in case of an error. + +The following @code{errno} error conditions are defined for this function: +@table @code +@item EINVAL +The value of the @var{parameter} is invalid. +@end table +@end deftypefun + +These symbolic constants are defined for use as the @var{parameter} +argument to @code{sysconf}. The values are all integer constants. + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_ARG_MAX +Inquire about the parameter corresponding to @code{ARG_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_CHILD_MAX +Inquire about the parameter corresponding to @code{CHILD_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_OPEN_MAX +Inquire about the parameter corresponding to @code{OPEN_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_STREAM_MAX +Inquire about the parameter corresponding to @code{STREAM_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_TZNAME_MAX +Inquire about the parameter corresponding to @code{TZNAME_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_NGROUPS_MAX +Inquire about the parameter corresponding to @code{NGROUPS_MAX}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_JOB_CONTROL +Inquire about the parameter corresponding to @code{_POSIX_JOB_CONTROL}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_SAVED_IDS +Inquire about the parameter corresponding to @code{_POSIX_SAVED_IDS}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_VERSION +Inquire about the parameter corresponding to @code{_POSIX_VERSION}. +@end defvr + +@comment unistd.h +@comment POSIX.1 +@defvr Macro _SC_CLK_TCK +Inquire about the parameter corresponding to @code{CLOCKS_PER_SEC}; +@pxref{Basic Elapsed CPU Time Inquiry}. +@end defvr + +@strong{Incomplete:} There are also a bunch of symbols for POSIX.2 +features listed in @file{<unistd.h>}. + + +@node String-Valued Parameters +@section String-Valued Parameters + +@strong{Incomplete:} The POSIX.2 @code{confstr} function goes here. |