diff options
Diffstat (limited to 'lib/libc/sys/fork.2')
-rw-r--r-- | lib/libc/sys/fork.2 | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index 0c290f6..e4bb7ef 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -59,9 +59,9 @@ for instance, file pointers in file objects are shared between the child and the parent, so that an .Xr lseek 2 on a descriptor in the child process can affect a subsequent -.Xr read +.Xr read 2 or -.Xr write +.Xr write 2 by the parent. This descriptor copying is also used by the shell to establish standard input and output for newly created processes @@ -88,13 +88,27 @@ will fail and no child process will be created if: .It Bq Er EAGAIN The system-imposed limit on the total number of processes under execution would be exceeded. -This limit is configuration-dependent. +The limit is given by the +.Xr sysctl 3 +MIB variable +.Dv KERN_MAXPROC . +(The limit is actually one less than this +except for the super user). .It Bq Er EAGAIN -The system-imposed limit -.Dv MAXUPRC -.Pq Aq Pa sys/param.h +The user is not the super user, and +the system-imposed limit on the total number of processes under execution by a single user would be exceeded. +The limit is given by the +.Xr sysctl 3 +MIB variable +.Dv KERN_MAXPROCPERUID . +.It Bq Er EAGAIN +The user is not the super user, and +the soft resource limit corresponding to the resource parameter +.Dv RLIMIT_NOFILE +would be exceeded (see +.Xr getrlimit 2 ) . .It Bq Er ENOMEM There is insufficient swap space for the new process. .El |