Merge pull request #1455 from dqminh/epoll-io

tty: move IO of master pty to be done with epoll
This commit is contained in:
Mrunal Patel
2017-09-11 11:32:42 -07:00
committed by GitHub
59 changed files with 4326 additions and 2024 deletions
+12 -3
View File
@@ -10,6 +10,7 @@ import (
"testing"
"time"
"github.com/containerd/console"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/utils"
@@ -289,7 +290,7 @@ func TestExecInTTY(t *testing.T) {
defer child.Close()
ps.ConsoleSocket = child
type cdata struct {
c libcontainer.Console
c console.Console
err error
}
dc := make(chan *cdata, 1)
@@ -299,10 +300,18 @@ func TestExecInTTY(t *testing.T) {
dc <- &cdata{
err: err,
}
return
}
libcontainer.SaneTerminal(f)
c, err := console.ConsoleFromFile(f)
if err != nil {
dc <- &cdata{
err: err,
}
return
}
console.SaneTerminal(f)
dc <- &cdata{
c: libcontainer.ConsoleFromFile(f),
c: c,
}
}()
err = container.Run(ps)