Add Pty and CloseStdin RPCs

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-04-06 12:19:00 -07:00
parent c1325a5aa9
commit a7da08b7ba
15 changed files with 1031 additions and 231 deletions

View File

@@ -28,6 +28,7 @@ type execProcess struct {
status int
pid int
closers []io.Closer
stdin io.Closer
parent *initProcess
}
@@ -78,6 +79,7 @@ func newExecProcess(context context.Context, path string, r *shimapi.ExecRequest
return nil, err
}
e.closers = append(e.closers, sc)
e.stdin = sc
}
if socket != nil {
console, err := socket.ReceiveMaster()
@@ -145,3 +147,7 @@ func (e *execProcess) Resize(ws console.WinSize) error {
func (e *execProcess) Signal(sig int) error {
return syscall.Kill(e.pid, syscall.Signal(sig))
}
func (e *execProcess) Stdin() io.Closer {
return e.stdin
}