From da06433e6dca4db6a200b87d0c812bf4ce7278fe Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 9 Oct 2017 15:48:47 +0200 Subject: [PATCH] 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 Signed-off-by: Michael Kerrisk --- man2/getrlimit.2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man2/getrlimit.2 b/man2/getrlimit.2 index 5876c6f7c..24091137e 100644 --- a/man2/getrlimit.2 +++ b/man2/getrlimit.2 @@ -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 .