| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: fork.2,v 1.23 2016/07/09 23:10:05 dholland Exp $ | | 1 | .\" $NetBSD: fork.2,v 1.24 2016/07/12 12:24:40 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1980, 1991, 1993 | | 3 | .\" Copyright (c) 1980, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" 3. Neither the name of the University nor the names of its contributors | | 14 | .\" 3. Neither the name of the University nor the names of its contributors |
| @@ -99,33 +99,32 @@ as soon as possible. | | | @@ -99,33 +99,32 @@ as soon as possible. |
99 | .Sh RETURN VALUES | | 99 | .Sh RETURN VALUES |
100 | Upon successful completion, | | 100 | Upon successful completion, |
101 | .Fn fork | | 101 | .Fn fork |
102 | returns a value | | 102 | returns a value |
103 | of 0 to the child process and returns the process ID of the child | | 103 | of 0 to the child process and returns the process ID of the child |
104 | process to the parent process. | | 104 | process to the parent process. |
105 | Otherwise, a value of \-1 is returned to the parent process, no | | 105 | Otherwise, a value of \-1 is returned to the parent process, no |
106 | child process is created, and the global variable | | 106 | child process is created, and the global variable |
107 | .Va errno | | 107 | .Va errno |
108 | is set to indicate the error. | | 108 | is set to indicate the error. |
109 | .Sh ERRORS | | 109 | .Sh ERRORS |
110 | .Fn fork | | 110 | .Fn fork |
111 | will fail and no child process will be created if: | | 111 | will fail and no child process will be created if: |
112 | .Bl -tag -width [EAGAIN] | | 112 | .Bl -tag -width XEAGAINXX |
113 | .It Bq Er EAGAIN | | 113 | .It Bq Er EAGAIN |
114 | The system-imposed limit on the total | | 114 | The system-imposed limit on the total |
115 | number of processes under execution would be exceeded. | | 115 | number of processes under execution would be exceeded. |
116 | This limit is configuration-dependent. | | 116 | This limit is configuration-dependent; or |
117 | .It Bq Er EAGAIN | | 117 | the limit |
118 | The limit | | | |
119 | .Dv RLIMIT_NPROC | | 118 | .Dv RLIMIT_NPROC |
120 | on the total number of | | 119 | on the total number of |
121 | processes under execution by this user id would be exceeded. | | 120 | processes under execution by this user id would be exceeded. |
122 | .It Bq Er ENOMEM | | 121 | .It Bq Er ENOMEM |
123 | There is insufficient swap space for the new process. | | 122 | There is insufficient swap space for the new process. |
124 | .El | | 123 | .El |
125 | .Sh SEE ALSO | | 124 | .Sh SEE ALSO |
126 | .Xr execve 2 , | | 125 | .Xr execve 2 , |
127 | .Xr setrlimit 2 , | | 126 | .Xr setrlimit 2 , |
128 | .Xr vfork 2 , | | 127 | .Xr vfork 2 , |
129 | .Xr wait 2 , | | 128 | .Xr wait 2 , |
130 | .Xr pthread_atfork 3 | | 129 | .Xr pthread_atfork 3 |
131 | .Sh STANDARDS | | 130 | .Sh STANDARDS |