getrlimit.2: Make it clear RLIMIT_NPROC is a limit on current number of processes

https://twitter.com/silentbicycle/status/893849097903505409

Reported-by: Scott Vokes <vokes.s@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-10-09 15:48:47 +02:00
parent 63345f2229
commit da06433e6d
1 changed files with 4 additions and 3 deletions

View File

@ -344,10 +344,11 @@ For further details, see
.BR unix (7).
.TP
.B RLIMIT_NPROC
This is the maximum number of processes
This is a limit on the number of extant process
(or, more precisely on Linux, threads)
that can be created for the real user ID of the calling process.
Upon encountering this limit,
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)
fails with the error
.BR EAGAIN .