Robust pid locking for shim processes

Closes #2832

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-06-21 15:28:16 -04:00
parent bb9616ba20
commit 719a2c594e
5 changed files with 35 additions and 9 deletions

View File

@@ -23,7 +23,11 @@ import (
)
// RuncRoot is the path to the root runc state directory
const RuncRoot = "/run/containerd/runc"
const (
RuncRoot = "/run/containerd/runc"
// StoppedPID is the pid assigned after a container has run and stopped
StoppedPID = -1
)
func stateName(v interface{}) string {
switch v.(type) {