From ed6c9eff0a5b54ae6a5a33e7557c9a58c2489e08 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 26 May 2017 11:52:27 -0700 Subject: [PATCH] config: Explicily make consoleSize unspecified if terminal is false or unset The old language is from a502caf6 (config: Add consoleSize to process, 2016-09-14, #563), where nobody commented on the "if attached" wording [1]. But reading the old line now, it's not clear to me what consoleSize means when terminal is not true. This commit explicitly declares consoleSize ignored in that condition. I'd rather have made it unspecified, so runtimes are free to do what they want short of erroring out, but Michael wanted the more specific "ignored" [2]. I considered making the property undefined or requiring it to be unset, but those seemed too strict given our permissive "MUST ignore unknown properties" extensibility requirement. [1]: https://github.com/opencontainers/runtime-spec/pull/563 [2]: https://github.com/opencontainers/runtime-spec/pull/863#discussion_r119682760 Signed-off-by: W. Trevor King --- config.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.md b/config.md index 78de158c..5e44ec57 100644 --- a/config.md +++ b/config.md @@ -137,7 +137,8 @@ For all platform-specific configuration values, the scope defined below in the [ * **`terminal`** (bool, OPTIONAL) specifies whether a terminal is attached to that process, defaults to false. As an example, if set to true on Linux a pseudoterminal pair is allocated for the container process and the pseudoterminal slave is duplicated on the container process's [standard streams][stdin.3]. -* **`consoleSize`** (object, OPTIONAL) specifies the console size in characters of the terminal if attached, containing the following properties: +* **`consoleSize`** (object, OPTIONAL) specifies the console size in characters of the terminal. + Runtimes MUST ignore `consoleSize` if `terminal` is `false` or unset. * **`height`** (uint, REQUIRED) * **`width`** (uint, REQUIRED) * **`cwd`** (string, REQUIRED) is the working directory that will be set for the executable.