github.com/fabiokung/docker@v0.11.2-0.20170222101415-4534dcd49497/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 }