diff options
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 | |||
