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

Commit 10eb687

Browse files
authored
Merge pull request #690 from jimoosciuc/master
kill shim carefully
2 parents 565496c + 38743b1 commit 10eb687

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/container.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ func deleteContainerHost(root, container string, spec *specs.Spec, state *State)
213213
return os.RemoveAll(filepath.Join(root, container))
214214
}
215215

216-
func addProcess(options runvOptions, vm *hypervisor.Vm, container, process string, spec *specs.Process) (shim *os.Process, err error) {
216+
func addProcess(options runvOptions, vm *hypervisor.Vm, container, process string, spec *specs.Process) (*os.Process, error) {
217217
p := &api.Process{
218218
Container: container,
219219
Id: process,
220220
OciProcess: *spec,
221221
}
222-
err = vm.AddProcess(p)
223222

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

234+
var shim *os.Process
234235
shim, err = createShim(options, container, process, spec)
235236
if err != nil {
236237
return nil, err

0 commit comments

Comments
 (0)