Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

Commit

Permalink
kill shim carefully
Browse files Browse the repository at this point in the history
  • Loading branch information
houxinzhu committed Jan 9, 2019
1 parent 565496c commit 38743b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/container.go
Expand Up @@ -213,14 +213,14 @@ func deleteContainerHost(root, container string, spec *specs.Spec, state *State)
return os.RemoveAll(filepath.Join(root, container))
}

func addProcess(options runvOptions, vm *hypervisor.Vm, container, process string, spec *specs.Process) (shim *os.Process, err error) {
func addProcess(options runvOptions, vm *hypervisor.Vm, container, process string, spec *specs.Process) (*os.Process, error) {
p := &api.Process{
Container: container,
Id: process,
OciProcess: *spec,
}
err = vm.AddProcess(p)

err := vm.AddProcess(p)
if err != nil {
glog.V(1).Infof("add process to container failed: %v", err)
return nil, err
Expand All @@ -231,6 +231,7 @@ func addProcess(options runvOptions, vm *hypervisor.Vm, container, process strin
}
}()

var shim *os.Process
shim, err = createShim(options, container, process, spec)
if err != nil {
return nil, err
Expand Down

0 comments on commit 38743b1

Please sign in to comment.