Add Pty and CloseStdin RPCs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user