Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ In addition to any devices configured with this setting, the runtime MUST also s
* [`/dev/random`][random.4]
* [`/dev/urandom`][random.4]
* [`/dev/tty`][tty.4]
* [`/dev/console`][console.4]
* [`/dev/console`][console.4] is setup if terminal is enabled in the config by bind mounting the pseudoterminal slave to /dev/console.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to require bind-mounting the slave over this. Let the runtime point /dev/console to a place it considers appropriate for logging system messages, which may not be the pseudoterminal slave. In fact, I'd expect the validation for /dev/console to be “Is the major 5, the minor 1, and the type ‘char’?”, which is not going to be satisfied by bind-mounting the slave.

That validation does not work inside containers. That particular major and minor number is reserved for consoles that are created as part of initial bootup (think physical console) on Linux. I think that it is entirely sufficient to just state that /dev/console should be a valid place to log system messages (which is what you suggested).

* [`/dev/ptmx`][pts.4].
A [bind-mount or symlink of the container's `/dev/pts/ptmx`][devpts].

Expand Down
4 changes: 3 additions & 1 deletion config.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [Se

**`process`** (object, REQUIRED) configures the container process.

* **`terminal`** (bool, OPTIONAL) specifies whether you want a terminal attached to that process, defaults to false.
* **`terminal`** (bool, optional) specifies whether a terminal is attached to that process, defaults to false.
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 of the terminal if attached, containing the following properties:
* **`height`** (uint, REQUIRED)
* **`width`** (uint, REQUIRED)
Expand Down Expand Up @@ -744,3 +745,4 @@ Here is a full example `config.json` for reference.
[mount.8-filesystem-independent]: http://man7.org/linux/man-pages/man8/mount.8.html#FILESYSTEM-INDEPENDENT_MOUNT%20OPTIONS
[mount.8-filesystem-specific]: http://man7.org/linux/man-pages/man8/mount.8.html#FILESYSTEM-SPECIFIC_MOUNT%20OPTIONS
[mount.8]: http://man7.org/linux/man-pages/man8/mount.8.html
[stdin.3]: http://man7.org/linux/man-pages/man3/stdin.3.html