moby--moby/pkg/pidfile/pidfile_unix.go

17 lines
230 B
Go

// +build !windows
package pidfile
import (
"os"
"path/filepath"
"strconv"
)
func processExists(pid int) bool {
if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil {
return true
}
return false
}