Fix container pid.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-11-27 15:29:44 -08:00
parent 3a31ce267d
commit a6b6097c90
5 changed files with 54 additions and 20 deletions

View File

@@ -39,8 +39,6 @@ import (
const (
// RuncRoot is the path to the root runc state directory
RuncRoot = "/run/containerd/runc"
// StoppedPID is the pid assigned after a container has run and stopped
StoppedPID = -1
// InitPidFile name of the file that contains the init pid
InitPidFile = "init.pid"
)
@@ -57,12 +55,6 @@ func (s *safePid) get() int {
return s.pid
}
func (s *safePid) set(pid int) {
s.Lock()
s.pid = pid
s.Unlock()
}
type atomicBool int32
func (ab *atomicBool) set(b bool) {