Add CloseStdin to exec Process
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
9890bed1e1
commit
1db752bca8
@ -88,3 +88,11 @@ func (p *process) Wait(ctx context.Context) (uint32, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *process) CloseStdin(ctx context.Context) error {
|
||||||
|
_, err := p.task.client.TaskService().CloseStdin(ctx, &execution.CloseStdinRequest{
|
||||||
|
ContainerID: p.task.containerID,
|
||||||
|
Pid: p.pid,
|
||||||
|
})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
1
task.go
1
task.go
@ -40,6 +40,7 @@ type Process interface {
|
|||||||
Start(context.Context) error
|
Start(context.Context) error
|
||||||
Kill(context.Context, syscall.Signal) error
|
Kill(context.Context, syscall.Signal) error
|
||||||
Wait(context.Context) (uint32, error)
|
Wait(context.Context) (uint32, error)
|
||||||
|
CloseStdin(context.Context) error
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = (Task)(&task{})
|
var _ = (Task)(&task{})
|
||||||
|
Loading…
Reference in New Issue
Block a user