You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This property was initially Linux-specific. 718f9f3 (minor narrative
cleanup regarding config compatibility, 2017-01-30, #673) removed the
Linux restriction, but the rlimit concept is from POSIX and Windows
doesn't support it [1]. This commit adds new subsections for the
POSIX-specific and Linux-specific process entries (to match the
approach we currently use for process.user), and punts to POSIX for
the Solaris values and compliance testing approach. If/when we get a
Solaris-specific doc for valid values, we can replace the POSIX punt
there, but we probably want to continue punting to POSIX for
getrlimit(3)-based compliance testing.
I've renamed the overly-specific LinuxRlimit to POSIXRlimit. We could
use the generic Rlimit, but then we'd be stuck if/when Windows adds
support for some rlimit-like thing that doesn't match up cleanly
enough for us to use the POSIX structure.
[1]: #835 (comment)
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: config.md
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,17 +156,33 @@ For POSIX platforms the `mounts` structure has the following fields:
156
156
***`env`** (array of strings, OPTIONAL) with the same semantics as [IEEE Std 1003.1-2008's `environ`][ieee-1003.1-2008-xbd-c8.1].
157
157
***`args`** (array of strings, REQUIRED) with similar semantics to [IEEE Std 1003.1-2008 `execvp`'s *argv*][ieee-1003.1-2008-xsh-exec].
158
158
This specification extends the IEEE standard in that at least one entry is REQUIRED, and that entry is used with the same semantics as `execvp`'s *file*.
159
+
160
+
### <aname="configLinuxAndSolarisProcess" />Linux and Solaris Process
161
+
162
+
For POSIX-based systems (Linux and Solaris), the `process` object supports the following process-specific properties:
163
+
159
164
***`rlimits`** (array of objects, OPTIONAL) allows setting resource limits for the process.
160
165
Each entry has the following structure:
161
166
162
-
***`type`** (string, REQUIRED) - the platform resource being limited, for example on Linux as defined in the [setrlimit(2)][setrlimit.2] man page.
163
-
***`soft`** (uint64, REQUIRED) - the value of the limit enforced for the corresponding resource.
164
-
***`hard`** (uint64, REQUIRED) - the ceiling for the soft limit that could be set by an unprivileged process.
165
-
Only a privileged process (e.g. under Linux: one with the CAP_SYS_RESOURCE capability) can raise a hard limit.
167
+
***`type`** (string, REQUIRED) the platform resource being limited.
168
+
* Linux: valid values are defined in the [`getrlimit(2)`][getrlimit.2] man page, such as `RLIMIT_MSGQUEUE`.
169
+
* Solaris: valid values are defined in the [`getrlimit(3)`][getrlimit.3] man page, such as `RLIMIT_CORE`.
170
+
171
+
The runtime MUST [generate an error](runtime.md#errors) for any values which cannot be mapped to a relevant kernel interface
172
+
For each entry in `rlimits`, a [`getrlimit(3)`][getrlimit.3] on `type` MUST succeed.
173
+
For the following properties, `rlim` refers to the status returned by the `getrlimit(3)` call.
174
+
175
+
***`soft`** (uint64, REQUIRED) the value of the limit enforced for the corresponding resource.
176
+
`rlim.rlim_cur` MUST match the configured value.
177
+
***`hard`** (uint64, REQUIRED) the ceiling for the soft limit that could be set by an unprivileged process.
178
+
`rlim.rlim_max` MUST match the configured value.
179
+
Only a privileged process (e.g. one with the `CAP_SYS_RESOURCE` capability) can raise a hard limit.
180
+
181
+
If `rlimits` contains duplicated entries with same `type`, the runtime MUST [generate an error](runtime.md#errors).
166
182
167
-
If `rlimits` contains duplicated entries with same `type`, the runtime MUST error out.
183
+
### <aname="configLinuxProcess" />Linux Process
168
184
169
-
For Linux-based systems the process structure supports the following process-specific fields.
185
+
For Linux-based systems, the `process` object supports the following process-specific properties.
170
186
171
187
***`apparmorProfile`** (string, OPTIONAL) specifies the name of the AppArmor profile for the process.
172
188
For more information about AppArmor, see [AppArmor documentation][apparmor].
@@ -837,7 +853,8 @@ Here is a full example `config.json` for reference.
0 commit comments