containerd-shim: Delete exec pidfile on exit
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
732b1560b4
commit
231c96098e
@ -7,6 +7,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
@ -114,6 +115,9 @@ func (e *execProcess) delete(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
e.io.Close()
|
e.io.Close()
|
||||||
}
|
}
|
||||||
|
pidfile := filepath.Join(e.path, fmt.Sprintf("%s.pid", e.id))
|
||||||
|
// silently ignore error
|
||||||
|
os.Remove(pidfile)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user