3055fd53df
Implements streamign exec handling in both executors (i.e. universal and libcontainer). For creation of TTY, some incidental complexity leaked in. The universal executor uses github.com/kr/pty for creation of TTYs. On the other hand, libcontainer expects a console socket and for libcontainer to create the underlying console object on process start. The caller can then use `libcontainer.utils.RecvFd()` to get tty master end. I chose github.com/kr/pty for managing TTYs here. I tried `github.com/containerd/console` package (which is already imported), but the package did not work as expected on macOS.
24 lines
318 B
Go
24 lines
318 B
Go
// +build windows
|
|
|
|
package executor
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func sessionCmdAttr(tty *os.File) *syscall.SysProcAttr {
|
|
return &syscall.SysProcAttr{}
|
|
}
|
|
|
|
func setTTYSize(w io.Writer, height, width int32) error {
|
|
return fmt.Errorf("unsupported")
|
|
|
|
}
|
|
|
|
func isUnixEIOErr(err error) bool {
|
|
return false
|
|
}
|