Add Pty and CloseStdin RPCs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -28,6 +28,7 @@ type initProcess struct {
|
||||
status int
|
||||
pid int
|
||||
closers []io.Closer
|
||||
stdin io.Closer
|
||||
}
|
||||
|
||||
func newInitProcess(context context.Context, path string, r *shimapi.CreateRequest) (*initProcess, error) {
|
||||
@@ -83,6 +84,7 @@ func newInitProcess(context context.Context, path string, r *shimapi.CreateReque
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.stdin = sc
|
||||
p.closers = append(p.closers, sc)
|
||||
}
|
||||
if socket != nil {
|
||||
@@ -175,3 +177,7 @@ func (p *initProcess) killAll(context context.Context) error {
|
||||
func (p *initProcess) Signal(sig int) error {
|
||||
return syscall.Kill(p.pid, syscall.Signal(sig))
|
||||
}
|
||||
|
||||
func (p *initProcess) Stdin() io.Closer {
|
||||
return p.stdin
|
||||
}
|
||||
|
Reference in New Issue
Block a user