From: Jason Wessel <[email protected]>

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 <[email protected]>
Signed-off-by: Bruce Ashfield <[email protected]>
---
 .../0001-runc-Add-console-socket-dev-null.patch    | 33 ++++++++++++++++++++++
 recipes-containers/runc/runc-docker_git.bb         |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 
recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch

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 000000000000..f49adfbf2147
--- /dev/null
+++ 
b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
@@ -0,0 +1,33 @@
+From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <[email protected]>
+Date: Wed, 12 Jul 2017 13:35:03 -0700
+Subject: [PATCH] runc: 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 <[email protected]>
+---
+ utils_linux.go | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/utils_linux.go b/utils_linux.go
+index 8085f7fe..e6d31b35 100644
+--- a/utils_linux.go
++++ b/utils_linux.go
+@@ -227,6 +227,11 @@ type runner struct {
+ }
+ 
+ func (r *runner) run(config *specs.Process) (int, error) {
++      if (r.consoleSocket == "/dev/null") {
++              r.detach = false
++              r.consoleSocket = ""
++              config.Terminal = false
++      }
+       if err := r.checkTerminal(config); err != nil {
+               r.destroy()
+               return -1, err
+-- 
+2.11.0
+
diff --git a/recipes-containers/runc/runc-docker_git.bb 
b/recipes-containers/runc/runc-docker_git.bb
index 194d6612f2b6..f412c84b2ecd 100644
--- a/recipes-containers/runc/runc-docker_git.bb
+++ b/recipes-containers/runc/runc-docker_git.bb
@@ -7,6 +7,7 @@ SRC_URI = 
"git://github.com/docker/runc.git;nobranch=1;name=runc-docker \
            
file://0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch \
            file://0002-Remove-Platform-as-no-longer-in-OCI-spec.patch \
            file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \
+           file://0001-runc-Add-console-socket-dev-null.patch \
           "
 
 RUNC_VERSION = "1.0.0-rc3"
-- 
2.4.0.53.g8440f74

-- 
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Reply via email to