Add Kill API for shim service

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang
2017-04-05 08:26:35 +08:00
parent 2048f891d2
commit 6132bec05a
13 changed files with 284 additions and 59 deletions

View File

@@ -158,6 +158,12 @@ func (p *initProcess) Resume(context context.Context) error {
return p.runc.Resume(context, p.id)
}
func (p *initProcess) Kill(context context.Context, signal uint32, all bool) error {
return p.runc.Kill(context, p.id, int(signal), &runc.KillOpts{
All: all,
})
}
func (p *initProcess) killAll(context context.Context) error {
return p.runc.Kill(context, p.id, int(syscall.SIGKILL), &runc.KillOpts{
All: true,