diff options
| author | Jason Wessel <jason.wessel@windriver.com> | 2017-07-13 10:09:03 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-07-13 13:53:57 -0400 |
| commit | 11fac209f2bb0e3b2a51a6c5304cbaa4cfeadcbe (patch) | |
| tree | dd5b41a8ca7393aad51d355f0ea97da9faa5b26f /recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch | |
| parent | d2dbd7d8d25b96d5ec58c693c50eb6159b8e4c96 (diff) | |
| download | meta-virtualization-11fac209f2bb0e3b2a51a6c5304cbaa4cfeadcbe.tar.gz | |
runc-docker: Add --console-socket=/dev/null
This allows for setting up a detached session where you do not want to
set the terminal to false in the config.json. More or less this is a
runtime override.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch')
| -rw-r--r-- | recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch new file mode 100644 index 00000000..f49adfbf --- /dev/null +++ b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jason Wessel <jason.wessel@windriver.com> | ||
| 3 | Date: Wed, 12 Jul 2017 13:35:03 -0700 | ||
| 4 | Subject: [PATCH] runc: Add --console-socket=/dev/null | ||
| 5 | |||
| 6 | This allows for setting up a detached session where you do not want to | ||
| 7 | set the terminal to false in the config.json. More or less this is a | ||
| 8 | runtime override. | ||
| 9 | |||
| 10 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
| 11 | --- | ||
| 12 | utils_linux.go | 5 +++++ | ||
| 13 | 1 file changed, 5 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/utils_linux.go b/utils_linux.go | ||
| 16 | index 8085f7fe..e6d31b35 100644 | ||
| 17 | --- a/utils_linux.go | ||
| 18 | +++ b/utils_linux.go | ||
| 19 | @@ -227,6 +227,11 @@ type runner struct { | ||
| 20 | } | ||
| 21 | |||
| 22 | func (r *runner) run(config *specs.Process) (int, error) { | ||
| 23 | + if (r.consoleSocket == "/dev/null") { | ||
| 24 | + r.detach = false | ||
| 25 | + r.consoleSocket = "" | ||
| 26 | + config.Terminal = false | ||
| 27 | + } | ||
| 28 | if err := r.checkTerminal(config); err != nil { | ||
| 29 | r.destroy() | ||
| 30 | return -1, err | ||
| 31 | -- | ||
| 32 | 2.11.0 | ||
| 33 | |||
