diff options
author | Fred Drake <fdrake@acm.org> | 1998-03-11 06:18:15 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-03-11 06:18:15 (GMT) |
commit | 60ba44750fd75a6883fdee3817ee6ca5a0a5580f (patch) | |
tree | 80edc7235854d4a2867e1a10cd53a5307052efbb /Doc/lib/libresource.tex | |
parent | 295eaa84b0cadf1e973009877d16e1ade7191f5d (diff) | |
download | cpython-60ba44750fd75a6883fdee3817ee6ca5a0a5580f.zip cpython-60ba44750fd75a6883fdee3817ee6ca5a0a5580f.tar.gz cpython-60ba44750fd75a6883fdee3817ee6ca5a0a5580f.tar.bz2 |
Logical markup.
Diffstat (limited to 'Doc/lib/libresource.tex')
-rw-r--r-- | Doc/lib/libresource.tex | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/Doc/lib/libresource.tex b/Doc/lib/libresource.tex index 6260a20..55b301b 100644 --- a/Doc/lib/libresource.tex +++ b/Doc/lib/libresource.tex @@ -20,7 +20,7 @@ A single exception is defined for errors: \subsection{Resource Limits} -Resources usage can be limited using the \code{setrlimit()} function +Resources usage can be limited using the \function{setrlimit()} function described below. Each resource is controlled by a pair of limits: a soft limit and a hard limit. The soft limit is the current limit, and may be lowered or raised by a process over time. The soft limit can @@ -29,15 +29,15 @@ value greater than the soft limit, but not raised. (Only processes with the effective UID of the super-user can raise a hard limit.) The specific resources that can be limited are system dependent. They -are described in the \code{getrlimit()} man page. The resources +are described in the \manpage{getrlimit}{2} man page. The resources listed below are supported when the underlying operating system supports them; resources which cannot be checked or controlled by the operating system are not defined in this module for those platforms. \begin{funcdesc}{getrlimit}{resource} Returns a tuple \code{(\var{soft}, \var{hard})} with the current - soft and hard limits of \var{resource}. Raises \code{ValueError} if - an invalid resource is specified, or \code{resource.error} if the + soft and hard limits of \var{resource}. Raises \exception{ValueError} if + an invalid resource is specified, or \exception{error} if the underyling system call fails unexpectedly. \end{funcdesc} @@ -47,19 +47,19 @@ operating system are not defined in this module for those platforms. integers describing the new limits. A value of \code{-1} can be used to specify the maximum possible upper limit. - Raises \code{ValueError} if an invalid resource is specified, if the new - soft limit exceeds the hard limit, or if a process tries to raise its - hard limit (unless the process has an effective UID of - super-user). Can also raise a \code{resource.error} if the - underyling system call fails. + Raises \exception{ValueError} if an invalid resource is specified, + if the new soft limit exceeds the hard limit, or if a process tries + to raise its hard limit (unless the process has an effective UID of + super-user). Can also raise \exception{error} if the underyling + system call fails. \end{funcdesc} These symbols define resources whose consumption can be controlled -using the \code{setrlimit()} and \code{getrlimit()} functions defined -below. The values of these symbols are exactly the constants used -by C programs. +using the \function{setrlimit()} and \function{getrlimit()} functions +described below. The values of these symbols are exactly the constants +used by \C{} programs. -The \UNIX{} man page for \code{getrlimit()} lists the available +The \UNIX{} man page for \manpage{getrlimit}{2} lists the available resources. Note that not all systems use the same symbol or same value to denote the same resource. @@ -72,8 +72,8 @@ value to denote the same resource. \begin{datadesc}{RLIMIT_CPU} The maximum amount of CPU time (in seconds) that a process can - use. If this limit is exceeded, a \code{SIGXCPU} signal is sent to - the process. (See the \code{signal} module documentation for + use. If this limit is exceeded, a \constant{SIGXCPU} signal is sent to + the process. (See the \module{signal} module documentation for information about how to catch this signal and do something useful, e.g. flush open files to disk.) \end{datadesc} @@ -107,7 +107,7 @@ value to denote the same resource. \end{datadesc} \begin{datadesc}{RLIMIT_OFILE} - The BSD name for \code{RLIMIT_NOFILE}. + The BSD name for \constant{RLIMIT_NOFILE}. \end{datadesc} \begin{datadesc}{RLIMIT_MEMLOC} @@ -131,7 +131,7 @@ These functiona are used to retrieve resource usage information: This function returns a large tuple that describes the resources consumed by either the current process or its children, as specified by the \var{who} parameter. The \var{who} parameter should be - specified using one of the \code{RUSAGE_}* constants described + specified using one of the \code{RUSAGE_*} constants described below. The elements of the return value each @@ -143,9 +143,9 @@ These functiona are used to retrieve resource usage information: The first two elements of the return value are floating point values representing the amount of time spent executing in user mode and the amount of time spent executing in system mode, respectively. The - remaining values are integers. Consult the \code{getrusage()} man page - for detailed information about these values. A brief summary is - presented here: + remaining values are integers. Consult the \manpage{getrusage}{2} + man page for detailed information about these values. A brief + summary is presented here: \begin{tableii}{|r|l|}{code}{Offset}{Resource} \lineii{0}{time in user mode (float)} @@ -166,36 +166,36 @@ These functiona are used to retrieve resource usage information: \lineii{15}{involuntary context switches} \end{tableii} - This function will raise a \code{ValueError} if an invalid \var{who} - parameter is specified. It may also raise a \code{resource.error} - exception in unusual circumstances. + This function will raise a \exception{ValueError} if an invalid + \var{who} parameter is specified. It may also raise + \exception{error} exception in unusual circumstances. \end{funcdesc} \begin{funcdesc}{getpagesize}{} Returns the number of bytes in a system page. (This need not be the same as the hardware page size.) This function is useful for determining the number of bytes of memory a process is using. The - third element of the tuple returned by \code{getrusage} describes + third element of the tuple returned by \function{getrusage()} describes memory usage in pages; multiplying by page size produces number of bytes. \end{funcdesc} -The following \code{RUSAGE_}* symbols are passed to the -\code{getrusage()} function to specify which processes information +The following \code{RUSAGE_*} symbols are passed to the +\function{getrusage()} function to specify which processes information should be provided for. \begin{datadesc}{RUSAGE_SELF} - \code{RUSAGE_SELF} should be used to + \constant{RUSAGE_SELF} should be used to request information pertaining only to the process itself. \end{datadesc} \begin{datadesc}{RUSAGE_CHILDREN} - Pass to \code{getrusage()} to request resource information for child - processes of the calling process. + Pass to \function{getrusage()} to request resource information for + child processes of the calling process. \end{datadesc} \begin{datadesc}{RUSAGE_BOTH} - Pass to \code{getrusage()} to request resources consumed by both the - current process and child processes. May not be available on all + Pass to \function{getrusage()} to request resources consumed by both + the current process and child processes. May not be available on all systems. \end{datadesc} |