blob: 2a24df9013833c068256ff23a66877b7a9662556 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
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 <jason.wessel@windriver.com>
---
utils_linux.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/utils_linux.go b/utils_linux.go
index 60d534e8..ddcab62f 100644
--- a/utils_linux.go
+++ b/utils_linux.go
@@ -234,6 +234,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
+ }
var err error
defer func() {
if err != nil {
--
2.40.0
|