diff options
Diffstat (limited to 'man2/getrlimit.2')
-rw-r--r-- | man2/getrlimit.2 | 140 |
1 files changed, 71 insertions, 69 deletions
diff --git a/man2/getrlimit.2 b/man2/getrlimit.2 index 68f880d5a..35a3e86e5 100644 --- a/man2/getrlimit.2 +++ b/man2/getrlimit.2 @@ -62,7 +62,7 @@ Standard C library .P .RS -4 Feature Test Macro Requirements for glibc (see -.BR feature_test_macros (7)): +.MR feature_test_macros 7 ): .RE .P .BR prlimit (): @@ -115,10 +115,10 @@ This is the maximum size of the process's virtual memory The limit is specified in bytes, and is rounded down to the system page size. .\" since Linux 2.0.27 / Linux 2.1.12 This limit affects calls to -.BR brk (2), -.BR mmap (2), +.MR brk 2 , +.MR mmap 2 , and -.BR mremap (2), +.MR mremap 2 , which fail with the error .B ENOMEM upon exceeding this limit. @@ -127,7 +127,7 @@ In addition, automatic stack expansion fails .B SIGSEGV that kills the process if no alternate stack has been made available via -.BR sigaltstack (2)). +.MR sigaltstack 2 ). Since the value is a \fIlong\fP, on machines with a 32-bit \fIlong\fP either this limit is at most 2\ GiB, or this resource is unlimited. .TP @@ -135,7 +135,7 @@ either this limit is at most 2\ GiB, or this resource is unlimited. This is the maximum size of a .I core file (see -.BR core (5)) +.MR core 5 ) in bytes that the process may dump. When 0 no core dump files are created. When nonzero, larger dumps are truncated to this size. @@ -167,10 +167,10 @@ of the process's data segment (initialized data, uninitialized data, and heap). The limit is specified in bytes, and is rounded down to the system page size. This limit affects calls to -.BR brk (2), -.BR sbrk (2), +.MR brk 2 , +.MR sbrk 2 , and (since Linux 4.7) -.BR mmap (2), +.MR mmap 2 , .\" commits 84638335900f1995495838fe1bd4870c43ec1f67 .\" ("mm: rework virtual memory accounting"), .\" f4fcd55841fc9e46daac553b39361572453c2b88 @@ -186,17 +186,17 @@ Attempts to extend a file beyond this limit result in delivery of a signal. By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., -.BR write (2), -.BR truncate (2)) +.MR write 2 , +.MR truncate 2 ) fails with the error .BR EFBIG . .TP .BR RLIMIT_LOCKS " (Linux 2.4.0 to Linux 2.4.24)" .\" to be precise: Linux 2.4.0-test9; no longer in Linux 2.4.25 / Linux 2.5.65 This is a limit on the combined number of -.BR flock (2) +.MR flock 2 locks and -.BR fcntl (2) +.MR fcntl 2 leases that this process may establish. .TP .B RLIMIT_MEMLOCK @@ -205,28 +205,28 @@ into RAM. This limit is in effect rounded down to the nearest multiple of the system page size. This limit affects -.BR mlock (2), -.BR mlockall (2), +.MR mlock 2 , +.MR mlockall 2 , and the -.BR mmap (2) +.MR mmap 2 .B MAP_LOCKED operation. Since Linux 2.6.9, it also affects the -.BR shmctl (2) +.MR shmctl 2 .B SHM_LOCK operation, where it sets a maximum on the total bytes in shared memory segments (see -.BR shmget (2)) +.MR shmget 2 ) that may be locked by the real user ID of the calling process. The -.BR shmctl (2) +.MR shmctl 2 .B SHM_LOCK locks are accounted for separately from the per-process memory locks established by -.BR mlock (2), -.BR mlockall (2), +.MR mlock 2 , +.MR mlockall 2 , and -.BR mmap (2) +.MR mmap 2 .BR MAP_LOCKED ; a process can lock bytes up to this limit in each of these two categories. @@ -241,7 +241,7 @@ the amount of memory that an unprivileged process may lock. This is a limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process. This limit is enforced for -.BR mq_open (3). +.MR mq_open 3 . Each message queue that the user creates counts (until it is removed) against this limit according to the formula: .RS 4 @@ -276,7 +276,7 @@ where is the .I mq_attr structure specified as the fourth argument to -.BR mq_open (3), +.MR mq_open 3 , and the .I msg_msg and @@ -291,9 +291,9 @@ nevertheless each consume some system memory for bookkeeping overhead). .TP .BR RLIMIT_NICE " (since Linux 2.6.12, but see BUGS below)" This specifies a ceiling to which the process's nice value can be raised using -.BR setpriority (2) +.MR setpriority 2 or -.BR nice (2). +.MR nice 2 . The actual ceiling for the nice value is calculated as .IR "20\ \-\ rlim_cur" . The useful range for this limit is thus from 1 @@ -306,15 +306,16 @@ For example, .B RLIM_INFINITY typically is the same as \-1. For more detail on the nice value, see -.BR sched (7). +.MR sched 7 . .TP .B RLIMIT_NOFILE This specifies a value one greater than the maximum file descriptor number that can be opened by this process. Attempts -.RB ( open (2), -.BR pipe (2), -.BR dup (2), +\%(\c +.MR open 2 , +.MR pipe 2 , +.MR dup 2 , etc.) to exceed this limit yield the error .BR EMFILE . @@ -329,10 +330,10 @@ an unprivileged process (one without the capability) may have "in flight" to other processes, by being passed across UNIX domain sockets. This limit applies to the -.BR sendmsg (2) +.MR sendmsg 2 system call. For further details, see -.BR unix (7). +.MR unix 7 . .TP .B RLIMIT_NPROC This is a limit on the number of extant process @@ -340,7 +341,7 @@ This is a limit on the number of extant process for the real user ID of the calling process. So long as the current number of processes belonging to this process's real user ID is greater than or equal to this limit, -.BR fork (2) +.MR fork 2 fails with the error .BR EAGAIN . .IP @@ -358,7 +359,7 @@ This is a limit (in bytes) on the process's resident set (the number of virtual pages resident in RAM). This limit has effect only in Linux 2.4.x, x < 30, and there affects only calls to -.BR madvise (2) +.MR madvise 2 specifying .BR MADV_WILLNEED . .\" As at Linux 2.6.12, this limit still does nothing in Linux 2.6 though @@ -368,12 +369,12 @@ specifying .BR RLIMIT_RTPRIO " (since Linux 2.6.12, but see BUGS)" This specifies a ceiling on the real-time priority that may be set for this process using -.BR sched_setscheduler (2) +.MR sched_setscheduler 2 and -.BR sched_setparam (2). +.MR sched_setparam 2 . .IP For further details on real-time scheduling policies, see -.BR sched (7) +.MR sched 7 .TP .BR RLIMIT_RTTIME " (since Linux 2.6.25)" This is a limit (in microseconds) @@ -385,7 +386,7 @@ each time a process makes a blocking system call, the count of its consumed CPU time is reset to zero. The CPU time count is not reset if the process continues trying to use the CPU but is preempted, its time slice expires, or it calls -.BR sched_yield (2). +.MR sched_yield 2 . .IP Upon reaching the soft limit, the process is sent a .B SIGXCPU @@ -402,7 +403,7 @@ The intended use of this limit is to stop a runaway real-time process from locking up the system. .IP For further details on real-time scheduling policies, see -.BR sched (7) +.MR sched 7 .TP .BR RLIMIT_SIGPENDING " (since Linux 2.6.8)" This is a limit on the number of signals @@ -410,9 +411,9 @@ that may be queued for the real user ID of the calling process. Both standard and real-time signals are counted for the purpose of checking this limit. However, the limit is enforced only for -.BR sigqueue (3); +.MR sigqueue 3 ; it is always possible to use -.BR kill (2) +.MR kill 2 to queue one instance of any of the signals that are not already queued to the process. .\" This replaces the /proc/sys/kernel/rtsig-max system-wide limit @@ -424,12 +425,13 @@ Upon reaching this limit, a .B SIGSEGV signal is generated. To handle this signal, a process must employ an alternate signal stack -.RB ( sigaltstack (2)). +\%(\c +.MR sigaltstack 2 ). .IP Since Linux 2.6.23, this limit also determines the amount of space used for the process's command-line arguments and environment variables; for details, see -.BR execve (2). +.MR execve 2 . .SS prlimit() .\" commit c022a0acad534fd5f5d5f17280f6d4d135e74e81 .\" Author: Jiri Slaby <jslaby@suse.cz> @@ -529,7 +531,7 @@ The caller tried to increase the hard limit above the maximum defined by .I /proc/sys/fs/nr_open (see -.BR proc (5)) +.MR proc 5 ) .TP .B EPERM .RB ( prlimit ()) @@ -542,7 +544,7 @@ Could not find a process with the ID specified in .IR pid . .SH ATTRIBUTES For an explanation of the terms used in this section, see -.BR attributes (7). +.MR attributes 7 . .TS allbox; lbx lb lb @@ -593,10 +595,10 @@ Linux 2.6.36, glibc 2.13. .SH NOTES A child process created via -.BR fork (2) +.MR fork 2 inherits its parent's resource limits. Resource limits are preserved across -.BR execve (2). +.MR execve 2 . .P Resource limits are per-process attributes that are shared by all of the threads in a process. @@ -611,14 +613,14 @@ One can set the resource limits of the shell using the built-in command .RI ( limit in -.BR csh (1)). +.MR csh 1 ). The shell's resource limits are inherited by the processes that it creates to execute commands. .P Since Linux 2.6.24, the resource limits of any process can be inspected via .IR /proc/ pid /limits ; see -.BR proc (5). +.MR proc 5 . .P Ancient systems provided a .BR vlimit () @@ -667,7 +669,7 @@ does not work in Linux 2.6.12; the problem is fixed in Linux 2.6.13. .P In Linux 2.6.12, there was an off-by-one mismatch between the priority ranges returned by -.BR getpriority (2) +.MR getpriority 2 and .BR RLIMIT_NICE . This had the effect that the actual ceiling for the nice value @@ -832,22 +834,22 @@ main(int argc, char *argv[]) .EE .\" SRC END .SH SEE ALSO -.BR prlimit (1), -.BR dup (2), -.BR fcntl (2), -.BR fork (2), -.BR getrusage (2), -.BR mlock (2), -.BR mmap (2), -.BR open (2), -.BR quotactl (2), -.BR sbrk (2), -.BR shmctl (2), -.BR malloc (3), -.BR sigqueue (3), -.BR ulimit (3), -.BR core (5), -.BR capabilities (7), -.BR cgroups (7), -.BR credentials (7), -.BR signal (7) +.MR prlimit 1 , +.MR dup 2 , +.MR fcntl 2 , +.MR fork 2 , +.MR getrusage 2 , +.MR mlock 2 , +.MR mmap 2 , +.MR open 2 , +.MR quotactl 2 , +.MR sbrk 2 , +.MR shmctl 2 , +.MR malloc 3 , +.MR sigqueue 3 , +.MR ulimit 3 , +.MR core 5 , +.MR capabilities 7 , +.MR cgroups 7 , +.MR credentials 7 , +.MR signal 7 |