diff options
author | Fabricio Voznika <fvoznika@google.com> | 2020-07-14 11:59:41 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-14 12:02:03 -0700 |
commit | 1bfb556ccdaee28ffea0cbdc37007edb10fa22c4 (patch) | |
tree | d71e231b0d43833196ee272e18940cba717b715a /runsc/sandbox | |
parent | 822fc99ecd65c6c93094d93e005a03ae25989fc9 (diff) |
Prepare boot.Loader to support multi-container TTY
- Combine process creation code that is shared between
root and subcontainer processes
- Move root container information into a struct for
clarity
Updates #2714
PiperOrigin-RevId: 321204798
Diffstat (limited to 'runsc/sandbox')
-rw-r--r-- | runsc/sandbox/sandbox.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go index 6e1a2af25..2afcc27af 100644 --- a/runsc/sandbox/sandbox.go +++ b/runsc/sandbox/sandbox.go @@ -478,9 +478,7 @@ func (s *Sandbox) createSandboxProcess(conf *boot.Config, args *Args, startSyncF // If the console control socket file is provided, then create a new // pty master/slave pair and set the TTY on the sandbox process. - if args.ConsoleSocket != "" { - cmd.Args = append(cmd.Args, "--console=true") - + if args.Spec.Process.Terminal && args.ConsoleSocket != "" { // console.NewWithSocket will send the master on the given // socket, and return the slave. tty, err := console.NewWithSocket(args.ConsoleSocket) |