blob: 48c1250d458480cc9d9057bf5963d8a92f4f328c [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Wed, 12 Jul 2017 13:35:03 -0700
4Subject: [PATCH] runc: Add --console-socket=/dev/null
5
6This allows for setting up a detached session where you do not want to
7set the terminal to false in the config.json. More or less this is a
8runtime override.
9
10Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
11---
12 utils_linux.go | 5 +++++
13 1 file changed, 5 insertions(+)
14
15diff --git a/utils_linux.go b/utils_linux.go
16index 8085f7fe..e6d31b35 100644
17--- a/src/import/utils_linux.go
18+++ b/src/import/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--
322.11.0
33