Add separate console socket

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-03-02 12:53:06 -08:00
parent 697cb97cb7
commit 00a0ecf554
14 changed files with 178 additions and 215 deletions

View File

@@ -7,6 +7,12 @@ import (
"unsafe"
)
func ConsoleFromFile(f *os.File) Console {
return &linuxConsole{
master: f,
}
}
// newConsole returns an initialized console that can be used within a container by copying bytes
// from the master side to the slave that is attached as the tty for the container's init process.
func newConsole() (Console, error) {