Windows: OCI process struct convergence

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f14f7711e7
Component: cli
This commit is contained in:
John Howard
2016-09-19 10:34:31 -07:00
parent 2eba4524b4
commit 1652332026
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
// a far better user experience rather than relying on subsequent resizes
// to cause things to catch up.
if runtime.GOOS == "windows" {
hostConfig.ConsoleSize[0], hostConfig.ConsoleSize[1] = dockerCli.Out().GetTtySize()
hostConfig.ConsoleSize.Height, hostConfig.ConsoleSize.Width = dockerCli.Out().GetTtySize()
}
ctx, cancelFun := context.WithCancel(context.Background())
+1 -1
View File
@@ -16,7 +16,7 @@ import (
)
// resizeTtyTo resizes tty to specific height and width
func resizeTtyTo(ctx context.Context, client client.ContainerAPIClient, id string, height, width int, isExec bool) {
func resizeTtyTo(ctx context.Context, client client.ContainerAPIClient, id string, height, width uint, isExec bool) {
if height == 0 && width == 0 {
return
}
+2 -2
View File
@@ -48,7 +48,7 @@ func (o *OutStream) RestoreTerminal() {
}
// GetTtySize returns the height and width in characters of the tty
func (o *OutStream) GetTtySize() (int, int) {
func (o *OutStream) GetTtySize() (uint, uint) {
if !o.isTerminal {
return 0, 0
}
@@ -59,7 +59,7 @@ func (o *OutStream) GetTtySize() (int, int) {
return 0, 0
}
}
return int(ws.Height), int(ws.Width)
return uint(ws.Height), uint(ws.Width)
}
// NewOutStream returns a new OutStream object from a Writer