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
runtime: Replace '$LISTEN_FDS + 3' with '--console-socket FD'
This bridges the gap between my original '--console-socket PATH'
proposal from 15350b3 (runtime: Add --console-socket for terminal
handling, 2017-02-08) and Michael's approach from baa2412 (runtime:
Replace '--console-socket PATH' with '$LISTEN_FDS + 3', 2017-02-08).
All of the benefits of not needing an on-disk socket, and none of the
magic of overloading $LISTEN_FDS. I don't know why Michael didn't
like this approach as much [1], but it feels a lot better to me.
[1]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-10-19-21.00.log.html#l-31
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: runtime.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ For example, POSIX systems define [`LANG` and related environment variables][pos
41
41
**`<ID>`* Set the container ID to create.
42
42
**Options*
43
43
**`--bundle <PATH>`* Override the path to the [bundle directory][bundle] (defaults to the current working directory).
44
+
**`--console-socket <FD>`* The runtime MUST pass the [pseudoterminal master][posix_openpt.3] through the open socket at file descriptor `<FD>`; the protocol is [described below](#console-socket).
44
45
**`--pid-file <PATH>`* The runtime MUST write the container PID to this path.
45
46
**Standard streams:*
46
47
* If [`process.terminal`][process] is true:
@@ -59,16 +60,13 @@ For example, POSIX systems define [`LANG` and related environment variables][pos
59
60
**Environment variables*
60
61
**`LISTEN_FDS`:* The number of file descriptors passed.
61
62
For example, `LISTEN_FDS=2` would mean that the runtime MUST pass file descriptors 3 and 4 to the container process (in addition to the standard streams) to support [socket activation][systemd-listen-fds].
62
-
**Additional file descriptors*
63
-
* If [`process.terminal`][process] is true, the caller MUST provide an open [`AF_UNIX` socket][unix-socket] on file descriptor `$LISTEN_FDS + 3`.
64
-
The runtime MUST pass the [pseudoterminal master][posix_openpt.3] through the socket; the protocol is [described below](#console-socket).
65
63
**Exit code:* Zero if the container was successfully created and non-zero on errors.
66
64
67
65
Callers MAY block on this command's successful exit to trigger post-create activity.
68
66
69
67
#### Console socket
70
68
71
-
The [`AF_UNIX`][unix-socket] used by the [`$LISTEN_FDS + 3`socket](#create) handles request and response messages between a runtime and server.
69
+
The [`AF_UNIX`][unix-socket] used by [`--console-socket`](#create) handles request and response messages between a runtime and server.
72
70
The socket type MUST be [`SOCK_SEQPACKET`][socket-types] or [`SOCK_STREAM`][socket-types].
73
71
The server MUST send a single response for each runtime request.
74
72
The [normal data][socket-queue] ([`msghdr.msg_iov*`][socket.h]) of all messages MUST be [UTF-8][][JSON](glossary.md#json).
0 commit comments