github.com/vvnotw/moby@v1.13.1/pkg/pidfile/pidfile_unix.go (about) 1 // +build !windows,!darwin 2 3 package pidfile 4 5 import ( 6 "os" 7 "path/filepath" 8 "strconv" 9 ) 10 11 func processExists(pid int) bool { 12 if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil { 13 return true 14 } 15 return false 16 }