fork.2: ERRORS: add pid_max and threads-max to EAGAIN

And rewrite text to be the same as pthread_create(3).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-14 06:49:14 +02:00
parent 20cbd039b2
commit 41dfc98f96
1 changed files with 16 additions and 8 deletions

View File

@ -185,14 +185,22 @@ cannot allocate sufficient memory to copy the parent's page tables and
allocate a task structure for the child.
.TP
.B EAGAIN
It was not possible to create a new process because the caller's
.B RLIMIT_NPROC
resource limit was encountered.
To exceed this limit, the process must have either the
.B CAP_SYS_ADMIN
or the
.B CAP_SYS_RESOURCE
capability.
\" NOTE! The following should match the description in pthread_create(3)
A system-imposed limit on the number of threads was encountered.
There are a number of limits that may trigger this error: the
.BR RLIMIT_NPROC
soft resource limit (set via
.BR setrlimit (2)),
which limits the number of processes and threads for a real user ID,
was reached;
the kernel's system-wide limit on the number of processes and threads,
.IR /proc/sys/kernel/threads-max ,
was reached (see
.BR proc (5));
or the maximum number of PIDs,
.IR /proc/sys/kernel/pid_max ,
was reached (see
.BR proc (5)).
.TP
.B EAGAIN
The caller is operating under the