shim executor: clean state dir if newProcess() failed
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
parent
abc1bf4dea
commit
d92f60e367
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,11 @@ func newProcess(ctx context.Context, o newProcessOpts) (*process, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
o.container.StateDir().DeleteProcess(o.ID)
|
||||
}
|
||||
}()
|
||||
|
||||
exitPipe, controlPipe, err := getControlPipes(procStateDir)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue